summaryrefslogtreecommitdiff
path: root/tools/run_cppcheck.sh
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2019-09-02 21:56:08 -0700
committerPhilip Chimento <philip.chimento@gmail.com>2019-10-12 21:20:56 -0700
commit07b568c5b8d889bbb63c54331efee81d17c7b584 (patch)
treec586c5b06c24c6e45acb5dfce28f93c793ccdb03 /tools/run_cppcheck.sh
parent868294f324efc6b276ccc5e1c8b1d02439676be9 (diff)
downloadgjs-07b568c5b8d889bbb63c54331efee81d17c7b584.tar.gz
build: Port cppcheck target to use compilation database
Using Meson, we get a compilation database in the build directory, which makes it much easier to run cppcheck. We remove the 'make cppcheck' target from the Autotools makefile and instead add a new tools/run_cppcheck.sh script to use the compilation database generated by Meson.
Diffstat (limited to 'tools/run_cppcheck.sh')
-rwxr-xr-xtools/run_cppcheck.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/run_cppcheck.sh b/tools/run_cppcheck.sh
new file mode 100755
index 00000000..68c8c8a5
--- /dev/null
+++ b/tools/run_cppcheck.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+ninja -C _build
+cppcheck --project=_build/compile_commands.json --inline-suppr \
+ --enable=warning,performance,portability,missingInclude \
+ --force --quiet $@