Skip to content
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

Merged
merged 3 commits into from
Oct 17, 2023
Merged

Enable clang-analyzer #2194

merged 3 commits into from
Oct 17, 2023

Commits on Oct 17, 2023

  1. common/string_utils: use handwritten stringFormat

    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.
    Riolku committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    a7e4760 View commit details
    Browse the repository at this point in the history
  2. tidy: enable clang-analyzer

    This enables a myriad of complex checks.
    Riolku committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    d2f2783 View commit details
    Browse the repository at this point in the history
  3. test: add binder tests for errors

    Add a test for every error not covered, as reported by lcov for lines
    changed after the stringFormat change.
    Riolku committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    9a4d2a6 View commit details
    Browse the repository at this point in the history