Skip to content

Commit

Permalink
editorconfig: indicate settings should be kept in sync
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
bk2204 authored and gitster committed Oct 9, 2018
1 parent 6f9beef commit b548d69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

# Use tabs whenever we need to fill whitespace that spans at least from one tab
# stop to the next one.
#
# These settings are mirrored in .editorconfig. Keep them in sync.
UseTab: Always
TabWidth: 8
IndentWidth: 8
Expand Down
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
charset = utf-8
insert_final_newline = true

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

0 comments on commit b548d69

Please sign in to comment.