detekt / detekt-intellij-plugin

detekt plugin for IntelliJ
https://plugins.jetbrains.com/plugin/10761-detekt
Apache License 2.0
297 stars 39 forks source link

Auto-correct not working #482

Closed ayush2297 closed 1 year ago

ayush2297 commented 1 year ago

I recently added the detekt in my kotlin spring boot project and ran ./gradlew detekt. I received multiple warnings and did not want to resolve them manually. That's when i came across this intellij plugin. The autocorrect feature does not seem to be working. Example : I am getting a simple warning of no new line at the end of the file. When I run autocorrect through the IDE plugin, it does nothing.

Please help as I am not sure if I am missing anything. Kindly, let me know if any further information is required.

arturbosch commented 1 year ago

Hi, have you enabled formatting in the settings? Also please try the first two checkboxes and see what the log files are saying, is formatting loaded ? Are formatting issues shown in the ide ? Screenshot from 2023-07-22 14-01-21

ayush2297 commented 1 year ago

This helped, thanks! I thought the formatting would work right away. It started working after enabling formatting rules.