parse-community / Parse-SDK-Android

The Android SDK for Parse Platform
https://parseplatform.org/
Other
1.88k stars 735 forks source link

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

Closed azlekov closed 2 years ago

azlekov commented 2 years ago

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

parse-github-assistant[bot] commented 2 years ago

Thanks for opening this pull request!

codecov[bot] commented 2 years ago

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.

parseplatformorg commented 2 years ago

πŸŽ‰ This pull request has been released in version 2.0.1

parseplatformorg commented 2 years ago

πŸŽ‰ This pull request has been released in version 2.0.1

parseplatformorg commented 2 years ago

πŸŽ‰ This pull request has been released in version 2.0.1

parseplatformorg commented 2 years ago

πŸŽ‰ This pull request has been released in version 2.0.1