diff options
| author | Thomas Holder <thomas@thomas-holder.de> | 2019-03-02 21:04:35 +0000 |
|---|---|---|
| committer | Thomas Holder <thomas@thomas-holder.de> | 2019-03-02 21:04:35 +0000 |
| commit | bd58add3c0a0d5f57276ab413cd24c8f9abc8eae (patch) | |
| tree | 322ff3d3905fe21463c93005458f5b006f1b0958 /buildtools | |
| parent | speed up clangtidy job (diff) | |
| download | inkscape-bd58add3c0a0d5f57276ab413cd24c8f9abc8eae.tar.gz inkscape-bd58add3c0a0d5f57276ab413cd24c8f9abc8eae.zip | |
fix clangtidy CI job
Diffstat (limited to 'buildtools')
| -rw-r--r-- | buildtools/clangtidy-helper.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/buildtools/clangtidy-helper.sh b/buildtools/clangtidy-helper.sh new file mode 100644 index 000000000..80e08581b --- /dev/null +++ b/buildtools/clangtidy-helper.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0-or-later +## +## usage: clangtidy-helper [list of cpp files] +## +## Without arguments, run for all source files. +## + +set -e + +mkdir -p build +cd build + +cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON + +run-clang-tidy -fix -header-filter='.*' "$@" > /dev/null + +# revert all fixes in protected directories +git checkout ../src/3rdparty/ ../src/2geom/ + +git diff | tee clang_tidy_diff + +if [[ -s clang_tidy_diff ]]; then + exit 1 +fi |
