Skip to content

Commit f2478e9

Browse files
m-schmoockcdecker
authored andcommitted
doc: point out 8char visual tabs in STYLE.md
Changelog-None
1 parent 24984ec commit f2478e9

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ trim_trailing_whitespace = true
1010

1111
[{**.c,**.h,Makefile}]
1212
indent_style = tab
13+
indent_size = 8
1314

1415
[**.py]
1516
indent_style = space

doc/STYLE.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,22 @@ using early returns or continues, eg:
3636
}
3737
```
3838

39+
## Tabs and indentaion
40+
41+
The C code uses TAB charaters with a visual indentation of 8 whitespaces.
42+
If you submit code for a review, make sure your editor knows this.
43+
44+
When breaking a line with more than 80 characters, align parameters and
45+
arguments like so:
46+
47+
```C
48+
static void subtract_received_htlcs(const struct channel *channel,
49+
struct amount_msat *amount)
50+
```
51+
52+
Note: For more details, the files `.clang-format` and `.editorconfig` are
53+
located in the projects root directory.
54+
3955
## Prefer Simple Statements
4056
4157
Notice the statement above uses separate tests, rather than combining

0 commit comments

Comments
 (0)