-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Clang-Tidy
to the Project
#54
Merged
franziska-wegner
merged 3 commits into
main
from
franziska-wegner/2023/december/CI/clang-tidy-cmake-integration
Dec 27, 2023
Merged
Add Clang-Tidy
to the Project
#54
franziska-wegner
merged 3 commits into
main
from
franziska-wegner/2023/december/CI/clang-tidy-cmake-integration
Dec 27, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Changes to be committed: modified: CMakeLists.txt new file: cmake/FindClangTidy.cmake
franziska-wegner
added
enhancement
New feature or request
CI/CD
Changes in the CI process
labels
Dec 27, 2023
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #54 +/- ##
=======================================
Coverage 93.26% 93.26%
=======================================
Files 29 29
Lines 2823 2823
=======================================
Hits 2633 2633
Misses 190 190 ☔ View full report in Codecov by Sentry. |
franziska-wegner
changed the title
Add Clang-Tidy to the Project
Add Dec 27, 2023
Clang-Tidy
to the Project
Why? * The CXX compiler identification is AppleClang 14.0.0.14000029 * ls -la /Library/Developer/CommandLineTools/usr/bin/c* * For more information, see https://stackoverflow.com/questions/53111082/how-to-install-clang-tidy-on-macos Changes to be committed: modified: .github/workflows/cmake-multi-platform.yml
Changes to be committed: modified: CMakeLists.txt modified: cmake/FindClangTidy.cmake
franziska-wegner
deleted the
franziska-wegner/2023/december/CI/clang-tidy-cmake-integration
branch
December 27, 2023 21:31
github-actions bot
added a commit
that referenced
this pull request
Dec 27, 2023
This PR enables `clang-tidy` in the main CMake file [5]. Clang-tidy will help to enable developer guidelines such as [1,2]. The C++ Core Guidelines checkers are more a MSVC tool, which is not usable in a multi-platform development framework. A documentation for `clang-tidy` can be found in [4]. References: [1] https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines [2] https://developers.google.com/style/ [3] https://github.com/MicrosoftDocs/cpp-docs/blob/main/docs/code-quality/using-the-cpp-core-guidelines-checkers.md [4] https://clang.llvm.org/extra/clang-tidy/ [5] https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_CLANG_TIDY.html * Add Clang-Tidy to the project * Install LLVM for Clang-Tidy on MacOS Why? * The CXX compiler identification is AppleClang 14.0.0.14000029 * ls -la /Library/Developer/CommandLineTools/usr/bin/c* * For more information, see https://stackoverflow.com/questions/53111082/how-to-install-clang-tidy-on-macos * Add GitHub's `homebrew` path hint to `find_program` 6a26946
github-actions bot
added a commit
that referenced
this pull request
Dec 27, 2023
This PR enables `clang-tidy` in the main CMake file [5]. Clang-tidy will help to enable developer guidelines such as [1,2]. The C++ Core Guidelines checkers are more a MSVC tool, which is not usable in a multi-platform development framework. A documentation for `clang-tidy` can be found in [4]. References: [1] https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines [2] https://developers.google.com/style/ [3] https://github.com/MicrosoftDocs/cpp-docs/blob/main/docs/code-quality/using-the-cpp-core-guidelines-checkers.md [4] https://clang.llvm.org/extra/clang-tidy/ [5] https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_CLANG_TIDY.html * Add Clang-Tidy to the project * Install LLVM for Clang-Tidy on MacOS Why? * The CXX compiler identification is AppleClang 14.0.0.14000029 * ls -la /Library/Developer/CommandLineTools/usr/bin/c* * For more information, see https://stackoverflow.com/questions/53111082/how-to-install-clang-tidy-on-macos * Add GitHub's `homebrew` path hint to `find_program` 6a26946
github-actions bot
added a commit
that referenced
this pull request
Dec 27, 2023
This PR enables `clang-tidy` in the main CMake file [5]. Clang-tidy will help to enable developer guidelines such as [1,2]. The C++ Core Guidelines checkers are more a MSVC tool, which is not usable in a multi-platform development framework. A documentation for `clang-tidy` can be found in [4]. References: [1] https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines [2] https://developers.google.com/style/ [3] https://github.com/MicrosoftDocs/cpp-docs/blob/main/docs/code-quality/using-the-cpp-core-guidelines-checkers.md [4] https://clang.llvm.org/extra/clang-tidy/ [5] https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_CLANG_TIDY.html * Add Clang-Tidy to the project * Install LLVM for Clang-Tidy on MacOS Why? * The CXX compiler identification is AppleClang 14.0.0.14000029 * ls -la /Library/Developer/CommandLineTools/usr/bin/c* * For more information, see https://stackoverflow.com/questions/53111082/how-to-install-clang-tidy-on-macos * Add GitHub's `homebrew` path hint to `find_program` 6a26946
github-actions bot
added a commit
that referenced
this pull request
Dec 27, 2023
This PR enables `clang-tidy` in the main CMake file [5]. Clang-tidy will help to enable developer guidelines such as [1,2]. The C++ Core Guidelines checkers are more a MSVC tool, which is not usable in a multi-platform development framework. A documentation for `clang-tidy` can be found in [4]. References: [1] https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines [2] https://developers.google.com/style/ [3] https://github.com/MicrosoftDocs/cpp-docs/blob/main/docs/code-quality/using-the-cpp-core-guidelines-checkers.md [4] https://clang.llvm.org/extra/clang-tidy/ [5] https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_CLANG_TIDY.html * Add Clang-Tidy to the project * Install LLVM for Clang-Tidy on MacOS Why? * The CXX compiler identification is AppleClang 14.0.0.14000029 * ls -la /Library/Developer/CommandLineTools/usr/bin/c* * For more information, see https://stackoverflow.com/questions/53111082/how-to-install-clang-tidy-on-macos * Add GitHub's `homebrew` path hint to `find_program` 6a26946
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR enables
clang-tidy
in the main CMake file [5]. Clang-tidy will help to enable developer guidelines such as [1,2]. The C++ Core Guidelines checkers are more a MSVC tool, which is not usable in a multi-platform development framework. A documentation forclang-tidy
can be found in [4].References:
[1] https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines
[2] https://developers.google.com/style/
[3] https://github.com/MicrosoftDocs/cpp-docs/blob/main/docs/code-quality/using-the-cpp-core-guidelines-checkers.md
[4] https://clang.llvm.org/extra/clang-tidy/
[5] https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_CLANG_TIDY.html
The standard
llvm
installation on MacOS does not containclang-tidy
, see the below 2 screenshots.The
brew
installation containsclang-tidy
. We add the installation step for MacOS withbrew install llvm
to the GitHub workflow and add a pathHINT
tofind_program
.