eic / EICrecon

EIC Reconstruction - JANA based
https://eic.github.io/EICrecon
GNU Lesser General Public License v3.0
6 stars 29 forks source link

feat(ci): change pre-commit clang-format to run in ci [skip pre-commit.ci] #1373

Open wdconinc opened 7 months ago

wdconinc commented 7 months ago

Briefly, what does this PR introduce?

We don't let the CI pre-commit job run automatic clang-format and cmake-format fixes. This PR changes that behavior for clang-format, by updating the clang-format pre-commit hook.

What kind of change does this PR introduce?

Please check if this PR fulfills the following:

Does this PR introduce breaking changes? What changes might users need to make to their code?

No changes.

Does this PR change default behavior?

Yes, it might lead to developers seeing their code reformatted automatically.

wdconinc commented 7 months ago

pre-commit.ci autofix

github-actions[bot] commented 7 months ago

Capybara summary for PR 1373

wdconinc commented 7 months ago

After squash merge, we should add the commit to .git-blame-ignore-revs, https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view.

wdconinc commented 6 months ago

clang-tidy error https://github.com/eic/EICrecon/actions/runs/8663802856/job/23763825088#step:9:120 is caused by the yaml file containing segments like:

- BuildDirectory: /home/runner/work/EICrecon/EICrecon/build/src/utilities/eicrecon
  DiagnosticMessage:
    FileOffset: 0
    FilePath: ''
    Message: macro replacement list should be enclosed in parentheses
    Replacements:
    - FilePath: ''
      Length: 0
      Offset: 15074
      ReplacementText: (
    - FilePath: ''
      Length: 0
      Offset: 15088
      ReplacementText: )
  DiagnosticName: bugprone-macro-parentheses
  Level: Warning

where the FilePath is empty. We should fix this, but the byte offset is not letting me figure out where the error is...