From befca854f84b1ebf730dd45b5e63a7928039b32d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 15 Sep 2018 11:53:11 +0200 Subject: Use clang-tidy for linting --- wscript | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'wscript') diff --git a/wscript b/wscript index 903c6e0..6023cc8 100644 --- a/wscript +++ b/wscript @@ -173,7 +173,16 @@ def build(bld): def lint(ctx): "checks code for style issues" - subprocess.call('cpplint.py --filter=+whitespace/comments,-whitespace/tab,-whitespace/braces,-whitespace/labels,-build/header_guard,-readability/casting,-readability/todo,-build/include src/* pugl/*', shell=True) + import subprocess + cmd = ("clang-tidy -p=. -header-filter=.* -checks=\"*," + + "-clang-analyzer-alpha.*," + + "-google-readability-todo," + + "-llvm-header-guard," + + "-misc-unused-parameters," + + "-hicpp-signed-bitwise," + # FIXME? + "-readability-else-after-return\" " + + "../pugl/*.c ../*.c") + subprocess.call(cmd, cwd='build', shell=True) # Alias .m files to be compiled the same as .c files, gcc will do the right thing. from waflib import TaskGen -- cgit v1.2.1