Skip to content

Commit b548d69

Browse files
bk2204gitster
authored andcommitted
editorconfig: indicate settings should be kept in sync
Now that we have two places where we set code formatting settings, .editorconfig and .clang-format, it's possible that they could fall out of sync. This is relatively unlikely, since we're not likely to change the tab width or our preference for tabs, but just in case, add comments to both files reminding future developers to keep them in sync. Signed-off-by: brian m. carlson <[email protected]> Reviewed-by: Taylor Blau <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6f9beef commit b548d69

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

.clang-format

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
# Use tabs whenever we need to fill whitespace that spans at least from one tab
88
# stop to the next one.
9+
#
10+
# These settings are mirrored in .editorconfig. Keep them in sync.
911
UseTab: Always
1012
TabWidth: 8
1113
IndentWidth: 8

.editorconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
charset = utf-8
33
insert_final_newline = true
44

5+
# The settings for C (*.c and *.h) files are mirrored in .clang-format. Keep
6+
# them in sync.
57
[*.{c,h,sh,perl,pl,pm}]
68
indent_style = tab
79
tab_width = 8

0 commit comments

Comments
 (0)