Add scripts for checking formatting, linting etc
This commit is contained in:
4
scripts/build-and-test.sh
Executable file
4
scripts/build-and-test.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
cmake --build build
|
||||
ctest --test-dir build --output-on-failure | grep -v :PASS
|
||||
2
scripts/check-format.sh
Executable file
2
scripts/check-format.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
scripts/list-source-files.sh | xargs -n1 clang-format --dry-run --Werror
|
||||
3
scripts/lint.sh
Executable file
3
scripts/lint.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
scripts/list-source-files.sh \
|
||||
| xargs -n1 clang-tidy -p build --warnings-as-errors='*'
|
||||
6
scripts/list-source-files.sh
Executable file
6
scripts/list-source-files.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
find . \
|
||||
-not \( -path './.git' -prune \) \
|
||||
-not \( -path './build' -prune \) \
|
||||
-not \( -path './dep' -prune \) \
|
||||
-name '*.c' -o -name '*.h'
|
||||
Reference in New Issue
Block a user