diff options
author | David Tolnay <dtolnay@gmail.com> | 2020-11-23 17:57:12 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-23 17:57:12 -0800 |
commit | 74c8ae42805ba15665bea845ce25c10b563fec9e (patch) | |
tree | 9de48adbb5d7fed1257f79cdbad8435a6598ccdd | |
parent | 7e8907a8450f529cd9846b9cca568a1e752e970e (diff) | |
parent | b5b260c2a7a3a504d28aa07496f54373cb094a53 (diff) | |
download | cxx-74c8ae42805ba15665bea845ce25c10b563fec9e.tar.gz |
Merge pull request #501 from dtolnay/tidy
Run clang-tidy in CI
-rw-r--r-- | .clang-tidy | 18 | ||||
-rw-r--r-- | .github/workflows/ci.yml | 10 | ||||
-rw-r--r-- | compile_flags.txt | 1 |
3 files changed, 29 insertions, 0 deletions
diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 00000000..b917995a --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,18 @@ +Checks: + clang-analyzer-*, + clang-diagnostic-*, + cppcoreguidelines-*, + modernize-*, + -cppcoreguidelines-avoid-magic-numbers, + -cppcoreguidelines-macro-usage, + -cppcoreguidelines-owning-memory, + -cppcoreguidelines-pro-bounds-array-to-pointer-decay, + -cppcoreguidelines-pro-type-const-cast, + -cppcoreguidelines-pro-type-member-init, + -cppcoreguidelines-pro-type-reinterpret-cast, + -cppcoreguidelines-special-member-functions, + -modernize-use-default-member-init, + -modernize-use-equals-default, + -modernize-use-override, + -modernize-use-trailing-return-type, +HeaderFilterRegex: cxx\.h diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02b22e5f..c9d60f83 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -94,3 +94,13 @@ jobs: - uses: actions/checkout@v2 - uses: dtolnay/rust-toolchain@clippy - run: cargo clippy --workspace --tests -- -Dclippy::all + + clang-tidy: + name: Clang Tidy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install clang-tidy + run: sudo apt-get install clang-tidy-10 + - name: Run clang-tidy + run: clang-tidy-10 src/cxx.cc --warnings-as-errors=* diff --git a/compile_flags.txt b/compile_flags.txt new file mode 100644 index 00000000..c24e3b5e --- /dev/null +++ b/compile_flags.txt @@ -0,0 +1 @@ +-std=c++11 |