summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-12-28 16:44:10 -0500
committerDavid Robillard <d@drobilla.net>2017-12-29 12:30:55 -0500
commitadf8271471abcbdc91ce405887530fe951b468a5 (patch)
tree37079eac317969cd5edeb6c16bc244f5cf388335
parent304918004e806f27525261de9ac39122e4aee7f2 (diff)
downloadsord-adf8271471abcbdc91ce405887530fe951b468a5.tar.gz
sord-adf8271471abcbdc91ce405887530fe951b468a5.tar.bz2
sord-adf8271471abcbdc91ce405887530fe951b468a5.zip
Use clang-format for linting
-rw-r--r--wscript14
1 files changed, 13 insertions, 1 deletions
diff --git a/wscript b/wscript
index 19bf625..66d9bfd 100644
--- a/wscript
+++ b/wscript
@@ -238,7 +238,19 @@ def build(bld):
bld.add_post_fun(fix_docs)
def lint(ctx):
- subprocess.call('clang-tidy -checks="*,-misc-unused-parameters,-readability-else-after-return,-llvm-header-guard,-google-readability-todo,-llvm-include-order,-clang-analyzer-alpha.*,-readability-inconsistent-declaration-parameter-name" -extra-arg="-std=c99" -extra-arg="-I." -extra-arg="-I../serd" -extra-arg="-I./src" -extra-arg="-Ibuild" ./sord/*.h ./src/*.c ./src/*.h', shell=True)
+ "checks code for style issues"
+ import subprocess
+ cmd = ("clang-tidy -p=. -header-filter=.* -checks=\"*," +
+ "-cert-dcl03-c," +
+ "-clang-analyzer-alpha.*," +
+ "-google-readability-todo," +
+ "-llvm-header-guard," +
+ "-llvm-include-order," +
+ "-misc-static-assert," +
+ "-misc-unused-parameters," +
+ "-readability-else-after-return\" " +
+ "../src/*.c")
+ subprocess.call(cmd, cwd='build', shell=True)
def fix_docs(ctx):
if ctx.cmd == 'build':