-
Notifications
You must be signed in to change notification settings - Fork 3
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
clang-tidy: Add .clang-tidy config file and use it to refine code base #31
Merged
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
The .clang-tidy file was generated by the following command. $ clang-tidy-14 -dump-config > .clang-tidy The clang-tidy can be executed by the following commands. $ cmake -B out $ run-clang-tidy -fix -header-filter=.* -format -style file -p out Signed-off-by: Honggyu Kim <honggyu.kp@gmail.com>
@Bojun-Seo Please have a look at this changes. |
honggyukim
force-pushed
the
review/use-clang-tidy
branch
from
April 15, 2023 13:41
7cd3e06
to
f3771bc
Compare
This patch fixes the following clang-tidy warnings. src/heaptrace.cc:117:8: warning: Value stored to 'old_libpath' during its initialization is never read src/libheaptrace.cc:71:8: warning: Value stored to 'tfs' during its initialization is never read src/libheaptrace.cc:171:24: warning: function previously declared with an explicit exception specification red eclared with an implicit exception specification src/libheaptrace.cc:189:24: warning: function previously declared with an explicit exception specification red eclared with an implicit exception specification src/stacktrace.cc:310:10: warning: Value stored to 'count' during its initialization is never read src/utils.cc:24:2: warning: Value stored to 'ret' is never read Signed-off-by: Honggyu Kim <honggyu.kp@gmail.com>
This patch adds bugprone and modernize clang-tidy checkers excluding some unnecessary checkers. It also applies automatic fixes by the checkers. Signed-off-by: Honggyu Kim <honggyu.kp@gmail.com>
This patch resolves some clang-tidy warnings by applying manual fixes. Signed-off-by: Honggyu Kim <honggyu.kp@gmail.com>
Signed-off-by: Honggyu Kim <honggyu.kp@gmail.com>
Signed-off-by: Honggyu Kim <honggyu.kp@gmail.com>
honggyukim
force-pushed
the
review/use-clang-tidy
branch
from
April 16, 2023 00:11
f3771bc
to
36dbf0f
Compare
@honggyukim It looks great. |
@Bojun-Seo Thanks. |
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.
clang-tidy is very useful when it comes to refine C++ project and this PR adds its configuration file and adopt its suggestions.
The clang-tidy can be executed by the following commands.
The current change was made based on clang-tidy-14.
The full list of checkers can be found at https://clang.llvm.org/extra/clang-tidy/checks/list.html.