-
-
Notifications
You must be signed in to change notification settings - Fork 735
refactor: configure disable rules and remove pre-commit-hook #1127
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
refactor: configure disable rules and remove pre-commit-hook #1127
Conversation
Thanks for opening this pull request!
|
Codecov Report
@@ Coverage Diff @@
## master #1127 +/- ##
=========================================
Coverage 65.28% 65.28%
Complexity 2218 2218
=========================================
Files 122 122
Lines 9957 9957
Branches 1337 1337
=========================================
Hits 6500 6500
Misses 2945 2945
Partials 512 512 Continue to review full report at Codecov.
|
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.
Looks good!
🎉 This pull request has been released in version 2.0.1 |
🎉 This pull request has been released in version 2.0.1 |
2 similar comments
🎉 This pull request has been released in version 2.0.1 |
🎉 This pull request has been released in version 2.0.1 |
New Pull Request Checklist
Issue Description
Looks like for contributors is hard to use spotless.
Wildcard imports
Contributors need to have setup ktlint on their IDEs to cover few particular formatting rules. One of these rules is for wildcard imports. On many projects this rule is disabled, as by default the IDE behaviour optimise the code using wildcard when needed, while ktlint enforce not to use the wildcard import and the build fail.
Spotless pre-commit hook
To use Spotless pre-commit hook, contributors must have configured
bash
on their machines in order to give permissions to the hook to be executed. This was done using a custom Gradle task which generated the hook.Related issue: #1126, #1125
Closes: #1126
Closes: #1125
Approach
Wildcard imports
My suggestion is to disable this rule in order to simplify the contributors work. This rule is not crucial.
Details how to configure the ktlint and the IDE can be found here
Spotless pre-commit hook
Because using of pre-commit hook requires additional technical knowledge, effort and configuration over the contributor machine and because it's already documented in
CONTRIBUTING.md
how to manually run the spotless my suggestion is to just remove the Gradle task, so there's no confusion because of misconfigurations.TODOs before merging
Add testsAdd changes to documentation (guides, repository pages, in-code descriptions)