👷 add CI steps for Clang-Tidy

This commit is contained in:
Niels Lohmann 2021-01-27 22:48:20 +01:00
parent cb28e76aa4
commit 87d1dc7ed2
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
2 changed files with 29 additions and 1 deletions

View File

@ -1,22 +1,29 @@
Checks: '*,
-cppcoreguidelines-avoid-goto,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-avoid-non-const-global-variables,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-pro-type-union-access,
-fuchsia-default-arguments-calls,
-fuchsia-default-arguments-declarations,
-fuchsia-overloaded-operator,
-google-explicit-constructor,
-google-readability-function-size,
-google-runtime-references,
-hicpp-avoid-goto,
-hicpp-explicit-conversions,
-hicpp-function-size,
-hicpp-no-array-decay,
-hicpp-no-assembler,
-hicpp-uppercase-literal-suffix,
-llvm-header-guard,
-llvm-include-order,
-misc-non-private-member-variables-in-classes,
-modernize-use-trailing-return-type,
-readability-function-size,
-readability-magic-numbers,
-readability-uppercase-literal-suffix'
-readability-uppercase-literal-suffix,
-llvmlibc-*'
CheckOptions:
- key: hicpp-special-member-functions.AllowSoleDefaultDtor

View File

@ -97,3 +97,24 @@ jobs:
run: cmake -S . -B build -DJSON_CI=On
- name: build
run: cmake --build build --target ci_cpplint
ci_clang_tidy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: install_ninja
run: |
sudo apt update
sudo apt install ninja-build
shell: bash
- name: install_clang
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 11
sudo apt-get install clang-tools-11
shell: bash
- name: cmake
run: cmake -S . -B build -DJSON_CI=On
- name: build
run: cmake --build build --target ci_clang_tidy || true