Skip to content

Commit

Permalink
Merge branch 'rs/clang-format-updates'
Browse files Browse the repository at this point in the history
Custom control structures we invented more recently have been
taught to the clang-format file.

* rs/clang-format-updates:
  clang-format: include kh_foreach* macros in ForEachMacros
  • Loading branch information
gitster committed Jul 15, 2024
2 parents ccb74f5 + 1457dff commit 76f4967
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -149,20 +149,25 @@ Cpp11BracedListStyle: false

# A list of macros that should be interpreted as foreach loops instead of as
# function calls. Taken from:
# git grep -h '^#define [^[:space:]]*for_each[^[:space:]]*(' \
# | sed "s,^#define \([^[:space:]]*for_each[^[:space:]]*\)(.*$, - '\1'," \
# | sort | uniq
# git grep -h '^#define [^[:space:]]*for_\?each[^[:space:]]*(' |
# sed "s/^#define / - '/; s/(.*$/'/" | sort | uniq
ForEachMacros:
- 'for_each_abbrev'
- 'for_each_builtin'
- 'for_each_string_list_item'
- 'for_each_ut'
- 'for_each_wanted_builtin'
- 'hashmap_for_each_entry'
- 'hashmap_for_each_entry_from'
- 'kh_foreach'
- 'kh_foreach_value'
- 'list_for_each'
- 'list_for_each_dir'
- 'list_for_each_prev'
- 'list_for_each_prev_safe'
- 'list_for_each_safe'
- 'strintmap_for_each_entry'
- 'strmap_for_each_entry'
- 'strset_for_each_entry'

# The maximum number of consecutive empty lines to keep.
MaxEmptyLinesToKeep: 1
Expand Down

0 comments on commit 76f4967

Please sign in to comment.