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

Remove running 'AutoCorrect' automatically on background and assign it to IDEA action #55

Merged

Conversation

dliakhov
Copy link
Contributor

@dliakhov dliakhov commented Dec 9, 2019

In this PR I removed automatically running 'AutoCorrect' feature on background because it causes issues (see #53, #21)

I also removed option "Auto correct" it from the configuration window in settings
Screenshot 2019-12-09 at 23 50 55

Added IDEA action "AutoCorrect by Detekt Rules" which is accessible in the Right-Click Menu -> "Refactor" -> "AutoCorrect by Detekt Rules" only for Kotlin files and when the plugin is enabled.
Screenshot 2019-12-09 at 23 54 08

Dmytro Liakhov added 3 commits December 8, 2019 23:36
…ection manually

Auto correction action can be called:
Right click on the open kotlin source file -> 'Refactor' -> 'AutoCorrect by Detekt Rules'
@dliakhov dliakhov changed the title Remove running 'AutoCorrect' automatically on background and assign it to IDEA action WIP Remove running 'AutoCorrect' automatically on background and assign it to IDEA action Dec 10, 2019
@dliakhov dliakhov closed this Dec 10, 2019
@dliakhov
Copy link
Contributor Author

Needs work. Found that plugin doesn't work on my other computer.

@dliakhov dliakhov reopened this Dec 10, 2019
@dliakhov
Copy link
Contributor Author

Found that Auto Correct feature doesn't work for my configuration when checkbox 'Fail fast' or 'Build upon the default configuration' are unchecked for my custom configuration.
I think it is correct behavior because my configuration, which I used for testing, didn't have rules for formatting.

@dliakhov dliakhov changed the title WIP Remove running 'AutoCorrect' automatically on background and assign it to IDEA action Remove running 'AutoCorrect' automatically on background and assign it to IDEA action Dec 11, 2019
Copy link
Member

@schalkms schalkms left a comment

Choose a reason for hiding this comment

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

Many many thanks for picking this up! The implementation looks fine to me.
Cool! This fix also needs to be a part of the next plugin release.

I think it is correct behavior because my configuration, which I used for testing, didn't have rules for formatting.

I have the same opinion.

Copy link
Member

@arturbosch arturbosch left a comment

Choose a reason for hiding this comment

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

Looks very good, thank you!

@arturbosch arturbosch merged commit df77386 into detekt:master Dec 15, 2019
@arturbosch arturbosch added this to the 0.4.0 milestone Dec 16, 2019
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

Successfully merging this pull request may close these issues.

None yet

3 participants