Merge branch 'kn/clang-format-updates'

Update ".clang-format" and ".editorconfig" to match our style guide
a bit better.

* kn/clang-format-updates:
  meson: add rule to run 'git clang-format'
  clang-format: add 'RemoveBracesLLVM' to the main config
  clang-format: set 'ColumnLimit' to 0
This commit is contained in:
Junio C Hamano
2025-07-14 11:19:26 -07:00
3 changed files with 28 additions and 29 deletions

View File

@@ -2133,6 +2133,18 @@ if headers_to_check.length() != 0 and compiler.get_argument_syntax() == 'gcc'
alias_target('check-headers', hdr_check)
endif
git_clang_format = find_program('git-clang-format', required: false, native: true)
if git_clang_format.found()
run_target('style',
command: [
git_clang_format,
'--style', 'file',
'--diff',
'--extensions', 'c,h'
]
)
endif
foreach key, value : {
'DIFF': diff.full_path(),
'GIT_SOURCE_DIR': meson.project_source_root(),