diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 000000000..b279868d2 --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,47 @@ +Checks: '-*, + clang-diagnostic-*, + llvm-*, + misc-*, + -misc-unused-parameters, + readability-identifier-naming, + -llvm-header-guard, + modernize-*, + readability-*, + performance-*, + misc-*, + bugprone-*, + cert-*, + cppcoreguidelines-*, + -cppcoreguidelines-pro-type-cstyle-cast, + -cppcoreguidelines-pro-bounds-pointer-arithmetic, + -cppcoreguidelines-pro-bounds-array-to-pointer-decay, + -cppcoreguidelines-pro-type-member-init, + -cppcoreguidelines-owning-memory, + -cppcoreguidelines-avoid-magic-numbers, + -readability-magic-numbers, + -performance-noexcept-move-constructor, + -misc-non-private-member-variables-in-classes, + -cppcoreguidelines-non-private-member-variables-in-classes, + -modernize-use-nodiscard, + -modernize-use-trailing-return-type, + -readability-identifier-length, + -readability-function-cognitive-complexity, + -bugprone-easily-swappable-parameters, + ' +CheckOptions: + - key: readability-identifier-naming.ClassCase + value: CamelCase + - key: readability-identifier-naming.EnumCase + value: CamelCase + - key: readability-identifier-naming.FunctionCase + value: camelBack + - key: readability-identifier-naming.MemberCase + value: camelBack + - key: readability-identifier-naming.PrivateMemberSuffix + value: _ + - key: readability-identifier-naming.UnionCase + value: CamelCase + - key: readability-identifier-naming.GlobalVariableCase + value: UPPER_CASE + - key: readability-identifier-naming.VariableCase + value: camelBack diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 397d49c2c..ccd405e47 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -142,10 +142,19 @@ jobs: -DCMAKE_BUILD_TYPE=Release \ -DPAJLADA_SETTINGS_USE_BOOST_FILESYSTEM=On \ -DUSE_PRECOMPILED_HEADERS=${{ matrix.pch }} \ + -DCMAKE_EXPORT_COMPILE_COMMANDS=On \ .. make -j$(nproc) shell: bash + - name: clang-tidy review + if: (startsWith(matrix.os, 'ubuntu') && matrix.pch == false && matrix.qt-version == '5.15.2') + uses: ZedThree/clang-tidy-review@v0.8.4 + id: review + with: + build_dir: build + config_file: '.clang-tidy' + - name: Package - AppImage (Ubuntu) if: startsWith(matrix.os, 'ubuntu') run: |