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

IntelliJ IDEA Plugin: autoCorrect when possible #142

Closed
TWiStErRob opened this issue Oct 8, 2021 · 2 comments
Closed

IntelliJ IDEA Plugin: autoCorrect when possible #142

TWiStErRob opened this issue Oct 8, 2021 · 2 comments

Comments

@TWiStErRob
Copy link
Member

Expected Behavior

Option in Alt+Enter to run the offending Rule again with autoCorrect=true on the active file.

Current Behavior

No actions on violations.
image

Context

autoCorrect is a really nice feature, but quite hard to use if we need to run command line utilities (e.g. gradlew :detekt with autoCorrect=true in build.gradle). The Detekt plugin is already showing the warning nicely where the Finding is. It would be quite useful to elevate Detekt to a level of IDEA inspections and have quick fixes.

@BraisGabin BraisGabin transferred this issue from detekt/detekt Oct 9, 2021
@TWiStErRob
Copy link
Member Author

Nice one @arturbosch, surprised how simple it is. A quick comment: "Format" assumes that the user is using the ktlint wrapper in Detekt, but autoCorrect is a general feature. "Auto-correct with Detekt" might be a more generic label.

@arturbosch
Copy link
Member

arturbosch commented May 31, 2022

Nice one @arturbosch, surprised how simple it is. A quick comment: "Format" assumes that the user is using the ktlint wrapper in Detekt, but autoCorrect is a general feature. "Auto-correct with Detekt" might be a more generic label.

Thanks for the suggestion. I totally agree that we should use Auto-correct to reflect detekt's autoCorrect feature #171.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants