Skip to content

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

Merged
merged 1 commit into from
Oct 14, 2021
Merged

refactor: configure disable rules and remove pre-commit-hook #1127

merged 1 commit into from
Oct 14, 2021

Conversation

azlekov
Copy link
Contributor

@azlekov azlekov commented Oct 14, 2021

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 tests
  • Add changes to documentation (guides, repository pages, in-code descriptions)
  • A changelog entry is created automatically using the pull request title (do not manually add a changelog entry)

@parse-github-assistant
Copy link

parse-github-assistant bot commented Oct 14, 2021

Thanks for opening this pull request!

  • 🎉 We are excited about your hands-on contribution!

@azlekov azlekov changed the title Configure disable rules and remove pre-commit-hook build: configure disable rules and remove pre-commit-hook Oct 14, 2021
@azlekov azlekov requested a review from mtrezza October 14, 2021 07:26
@azlekov azlekov self-assigned this Oct 14, 2021
@codecov
Copy link

codecov bot commented Oct 14, 2021

Codecov Report

Merging #1127 (8876d5f) into master (2945b30) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2945b30...8876d5f. Read the comment docs.

@mtrezza mtrezza changed the title build: configure disable rules and remove pre-commit-hook refactor: configure disable rules and remove pre-commit-hook Oct 14, 2021
@mtrezza mtrezza merged commit 25b4f34 into parse-community:master Oct 14, 2021
Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@parseplatformorg
Copy link

🎉 This pull request has been released in version 2.0.1

@parseplatformorg parseplatformorg added the state:released Released as stable version label Oct 14, 2021
@parseplatformorg
Copy link

🎉 This pull request has been released in version 2.0.1

2 similar comments
@parseplatformorg
Copy link

🎉 This pull request has been released in version 2.0.1

@parseplatformorg
Copy link

🎉 This pull request has been released in version 2.0.1

@azlekov azlekov deleted the spotless-fixes-and-improvements branch October 15, 2021 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released Released as stable version
Projects
None yet
3 participants