From 29ad2127d35e347decd92545c4884d5a41f286d0 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 29 Dec 2017 15:23:37 -0500 Subject: Use clang-tidy for linting --- wscript | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/wscript b/wscript index feee53bb..c948f2d5 100644 --- a/wscript +++ b/wscript @@ -292,7 +292,24 @@ def build(bld): bld.add_post_fun(autowaf.run_ldconfig) def lint(ctx): - subprocess.call('cpplint.py --filter=-whitespace/comments,-whitespace/tab,-whitespace/braces,-whitespace/labels,-build/header_guard,-readability/casting,-readability/todo,-build/namespaces,-whitespace/line_length,-runtime/rtti,-runtime/references,-whitespace/blank_line,-runtime/sizeof,-readability/streams,-whitespace/operators,-whitespace/parens,-build/include,-build/storage_class `find -name *.cpp -or -name *.hpp`', shell=True) + "checks code for style issues" + import subprocess + cmd = ("clang-tidy -p=. -header-filter=ingen/ -checks=\"*," + + "-clang-analyzer-alpha.*," + + "-cppcoreguidelines-*," + + "-cppcoreguidelines-pro-type-union-access," + + "-google-build-using-namespace," + + "-google-readability-casting," + + "-google-readability-todo," + + "-llvm-header-guard," + + "-llvm-include-order," + + "-llvm-namespace-comment," + + "-misc-unused-parameters," + + "-readability-else-after-return," + + "-readability-implicit-bool-cast," + + "-readability-named-parameter\" " + + "$(find .. -name '*.cpp')") + subprocess.call(cmd, cwd='build', shell=True) def upload_docs(ctx): import shutil -- cgit v1.2.1