-
Notifications
You must be signed in to change notification settings - Fork 37
Introduce clang-tidy and optimize code
#83
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
5e787bf
Add option to run `clang-tidy` with compiler
hebasto 8dd83bb
clang-tidy: Suppress `bugprone-suspicious-semicolon` check warning
hebasto 1a33c35
clang-tidy: Fix `modernize-return-braced-init-list` check
hebasto 18b52c1
clang-tidy: Fix `modernize-use-emplace` check
hebasto 9f86c9a
clang-tidy: Fix `modernize-use-equals-default` check
hebasto ae416f9
clang-tidy: Fix `modernize-use-nullptr` check
hebasto a435b24
clang-tidy: Fix `performance-faster-string-find` check
hebasto 463bead
clang-tidy: Fix `performance-inefficient-vector-operation` check
hebasto 037fec4
clang-tidy: Fix `performance-unnecessary-value-param` check
hebasto 594466a
clang-tidy: Fix `readability-make-member-function-const` check
hebasto File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| Checks: ' | ||
| -*, | ||
| bugprone-*, | ||
| -bugprone-easily-swappable-parameters, | ||
| -bugprone-exception-escape, | ||
| -bugprone-move-forwarding-reference, | ||
| -bugprone-narrowing-conversions, | ||
| -bugprone-reserved-identifier, | ||
| misc-*, | ||
| -misc-non-private-member-variables-in-classes, | ||
| -misc-no-recursion, | ||
| -misc-unconventional-assign-operator, | ||
| -misc-unused-parameters, | ||
| modernize-*, | ||
| -modernize-avoid-c-arrays, | ||
| -modernize-concat-nested-namespaces, | ||
| -modernize-deprecated-headers, | ||
| -modernize-use-nodiscard, | ||
| -modernize-use-trailing-return-type, | ||
| -modernize-use-using, | ||
| performance-*, | ||
| -performance-noexcept-move-constructor, | ||
| readability-*, | ||
| -readability-braces-around-statements, | ||
| -readability-convert-member-functions-to-static, | ||
| -readability-else-after-return, | ||
| -readability-function-cognitive-complexity, | ||
| -readability-identifier-length, | ||
| -readability-implicit-bool-conversion, | ||
| -readability-inconsistent-declaration-parameter-name, | ||
| -readability-magic-numbers, | ||
| -readability-named-parameter, | ||
| -readability-uppercase-literal-suffix, | ||
| -readability-use-anyofallof, | ||
| ' | ||
| CheckOptions: | ||
| - key: modernize-use-override.IgnoreDestructors | ||
| value: true | ||
| HeaderFilterRegex: 'example/calculator.h|example/init.h|example/printer.h|include/mp/proxy-io.h|include/mp/proxy-types.h|include/mp/proxy.h|include/mp/util.h|test/mp/test/foo-types.h|test/mp/test/foo.h' |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In commit "clang-tidy: Fix
performance-unnecessary-value-paramcheck" (0498ed8)Note: I think it does make sense to suppress this lint warning than try to avoid it. Could potentially avoid it by changing this argument to
const shared_ptrbut there's currently no IPC serialization code to handleconst shared_ptronlyshared_ptr, so it does't compile. Also I don't think it would make sense to add const shared_ptr serialization code because most cases where you would passconst shared<ptr>it probably makes more sense to pass a plain const reference.