Add Github action that checks formatting.#1019
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1019 +/- ##
=========================================
Coverage 71.97% 71.97%
Complexity 1320 1320
=========================================
Files 135 135
Lines 4813 4813
Branches 491 491
=========================================
Hits 3464 3464
Misses 1091 1091
Partials 258 258 Continue to review full report at Codecov.
|
bruno-garcia
left a comment
There was a problem hiding this comment.
Does it push the diff back into the PR?
What about something like this: https://github.com/getsentry/sentry-cocoa/blob/master/.github/workflows/format-code.yml
I'd say it doesn't, and now I wonder what's the difference between this PR and this: https://github.com/getsentry/sentry-java/blob/main/build.gradle.kts#L129-L131 because they do pretty much the same thing and the CI already calls |
It doesn't but I can add this action that commit changes back.
The difference is that calling |
I see, makes sense, I have this as a pre-commit hook actually. but yeah CI would be great as well |
📢 Type of change
📜 Description
Adds Github action to check if code is properly formatted.
💡 Motivation and Context
We often get PRs merged that do not have code properly formatted. As the result, formatting fixes sneak in to other PRs adding noise.
This change will prevent PR build success in case code is not properly formatted.
💚 How did you test it?
📝 Checklist