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

Fix pre-commit formatting of C++ files #1536

Merged
merged 2 commits into from
Sep 22, 2023
Merged

Commits on Sep 22, 2023

  1. Fix file selection in clang-format pre-commit hook.

    We would previously files which had _both_ `c` and `c++` types which
    would only match much fewer files than intended (e.g., `.h` would be
    classified that way).
    
    With this patch we now use `types_or` which combines types with `OR`
    like we originally intended.
    bbannier committed Sep 22, 2023
    Configuration menu
    Copy the full SHA
    3f419d4 View commit details
    Browse the repository at this point in the history
  2. Add explicit dependency for local pre-commit hook.

    The implementation of the `stray-baselines` hook relies on `btest`. We
    would previously assume it was installed out of band which makes the
    default pre-commit hooks cumbersome to use (e.g., opaque failure if
    dependency missing).
    
    This patch explicitly declares the Python dependency which then gets
    managed by pre-commit. This should come with no new risk as we do not
    rely on version-dependent BTest features in the hook.
    bbannier committed Sep 22, 2023
    Configuration menu
    Copy the full SHA
    c9f3607 View commit details
    Browse the repository at this point in the history