mirror of
https://github.com/git/git.git
synced 2026-01-09 17:46:37 +00:00
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:
12
meson.build
12
meson.build
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user