-
Notifications
You must be signed in to change notification settings - Fork 143
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
ci: Add pre-commit yaml configuration #17227
base: main
Are you sure you want to change the base?
ci: Add pre-commit yaml configuration #17227
Conversation
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #17227 +/- ##
=========================================
Coverage 67.41% 67.41%
Complexity 22063 22063
=========================================
Files 2585 2585
Lines 96408 96408
Branches 10071 10071
=========================================
Hits 64992 64992
Misses 27698 27698
Partials 3718 3718 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should offer a pre-commit.yaml
configuration instead of building a custom git hook.
@nathanklick The idea here is to make it the same way as it is in hedera-mirror-node: https://github.com/hashgraph/hedera-mirror-node/blob/a6da57c2e94e65859a2c4e39cca0620836128cde/buildSrc/build.gradle.kts#L58 @mustafauzunn Can also provide more details if needed. |
I think @nathanklick s point is that we shouldn't be modifying local commit history with this pre-commit hook. Offering the pre-commit yaml and the gradle task which already exists |
It would be good to reach some general agreement on how/if such a feature should exist in all Hedera repositories. When we move MirrorNode to the shared Gradle configuration – hashgraph/hedera-mirror-node#10035 – the Gradle part has to be addressed. Either by removing the functionality or by adding something that works everywhere to the shared configuration. My feeling is that it would be best to do this, if at all, without Gradle being involved in installing the hook. E.g., if some developers would like to use such a hook they can install it on their machine manually. And we just host the hook setup for calling |
0879c57
to
6a69965
Compare
b42e01d
to
4a0db08
Compare
Signed-off-by: Mihail Mihov <[email protected]>
Signed-off-by: Mihail Mihov <[email protected]>
4a0db08
to
13f7f9a
Compare
Description:
Add pre-commit yaml configuration for the pre-commit tool, which will run the spotlessApply gradle task.
Related issue(s):
Fixes #17223
Notes for reviewer:
Checklist