Unverified Commit 4cc9b264 authored by Kip's avatar Kip Committed by GitHub

Merge pull request #881 from Tachi107/meson-clang-format

Add Meson clang-format target
parents 274a88e3 e41c18f6
...@@ -115,3 +115,10 @@ endif ...@@ -115,3 +115,10 @@ endif
if get_option('PISTACHE_BUILD_DOCS') if get_option('PISTACHE_BUILD_DOCS')
subdir('docs') subdir('docs')
endif endif
if find_program('clang-format', required: false).found()
run_target(
'format',
command: (find_program('tools/format.sh'))
)
endif
#!/usr/bin/env bash #!/bin/sh
set -eu set -eu
if [ ! -z ${MESON_SOURCE_ROOT+x} ]; then cd "${MESON_SOURCE_ROOT}"; fi
find_files() { find_files() {
git ls-files --cached --exclude-standard --others | grep -E '\.(cc|cpp|h)$' git ls-files --cached --exclude-standard --others | grep -E '\.(cc|cpp|h)$'
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment