diff --git a/.clang-tidy b/.clang-tidy index 046d84f87..395647e8b 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -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 diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 8036fba2a..10c6fbf26 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -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