-
Notifications
You must be signed in to change notification settings - Fork 85
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
Enable clang-analyzer #2194
Enable clang-analyzer #2194
Conversation
8432501
to
ee3bc67
Compare
ee3bc67
to
0db2d9a
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #2194 +/- ##
==========================================
+ Coverage 89.58% 89.68% +0.10%
==========================================
Files 1006 1008 +2
Lines 36313 35830 -483
==========================================
- Hits 32530 32135 -395
+ Misses 3783 3695 -88
☔ View full report in Codecov by Sentry. |
The missing coverage is a good opportunity to make sure we hit all these errors. I suppose I will add tests for these tomorrow/monday. |
bf5e94b
to
564a9ae
Compare
2ec9964
to
7e43e23
Compare
Using spdlog::fmt (which is really just fmtlib) is overkill. Our codebase only uses `{}`, and so this commit implements exactly that (along with the ability to escape values). Experimentally this gives us a 15% compilation speedup. It also moves string formatting to its own file, because of how often it is included. Finally, this change is conducive to adding clang-analyzer to clang-tidy, as spdlog has an unitialized object warning.
This enables a myriad of complex checks.
7e43e23
to
3ab4c79
Compare
Add a test for every error not covered, as reported by lcov for lines changed after the stringFormat change.
3ab4c79
to
9a4d2a6
Compare
The leftover missing coverage will be handled in followup PRs. It's all non-trivial changes. |
This PR implements a new handwritten
stringFormat
function (maybe it should be calledStringFormat::fmt
?)Using spdlog::fmt (which is really just fmtlib) is overkill. Our
codebase only uses
{}
, and so this commit implements exactly that(along with the ability to escape values). Experimentally this gives us
a 15% compilation speedup.
It also moves string formatting to its own file, because of how often it
is included. Finally, this change is conducive to adding clang-analyzer
to clang-tidy, as spdlog has an unitialized object warning.
Finally, this PR enables clang-analyzer in clang-tidy.