Skip to content
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

Allow setting default autocorrect mode with Gradle property #7040

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

3flex
Copy link
Member

@3flex 3flex commented Mar 12, 2024

This makes it possible to enable autocorrect when running tasks that depend on detekt tasks e.g.
./gradlew check -Pdetekt.default.autocorrect=true

Without this, the only way to enable autocorrect on CLI is by declaring every detekt task on the CLI and passing --auto-correct to every one.

Tests will be added once #6913 is merged as that provides some support to pass Gradle properties through to the CLI when setting up tests.

@3flex 3flex added this to the 2.0.0 milestone Mar 12, 2024
@detekt-ci
Copy link
Collaborator

detekt-ci commented Mar 12, 2024

Warnings
⚠️ It looks like this PR contains functional changes without a corresponding test.

Generated by 🚫 dangerJS against 729f322

@3flex 3flex marked this pull request as draft March 12, 2024 07:50
Copy link

codecov bot commented Mar 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.79%. Comparing base (9403c84) to head (729f322).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #7040   +/-   ##
=========================================
  Coverage     83.79%   83.79%           
  Complexity     3941     3941           
=========================================
  Files           579      579           
  Lines         12119    12119           
  Branches       2511     2511           
=========================================
  Hits          10155    10155           
  Misses          710      710           
  Partials       1254     1254           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This makes it possible to enable autocorrect when running tasks that
depend on detekt tasks e.g. ./gradlew check
-Pdetekt.default.autocorrect=true

Without this, the only way to enable autocorrect on CLI is by declaring
every detekt task on the CLI and passing --auto-correct to every one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants