diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-07-15 10:11:42 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-07-15 10:11:42 -0700 |
| commit | 76f49679b1d96a36ada2d08f2bb3df211ad04bd6 (patch) | |
| tree | ab99057674febf477c91d56feb12520eefd26ac6 | |
| parent | ccb74f51c9c31833b131936cdb2e135d9c699ef1 (diff) | |
| parent | 1457dff9be97955f5ef9d780cc340e4691d2818b (diff) | |
| download | git-76f49679b1d96a36ada2d08f2bb3df211ad04bd6.tar.gz | |
Merge branch 'rs/clang-format-updates'
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
| -rw-r--r-- | .clang-format | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/.clang-format b/.clang-format index 3ed4fac753..6408251577 100644 --- a/.clang-format +++ b/.clang-format @@ -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 |
