jshiell / checkstyle-idea

CheckStyle plug-in for IntelliJ IDEA
https://plugins.jetbrains.com/plugin/1065-checkstyle-idea
Other
889 stars 161 forks source link

Set arrangement rules based on DeclarationOrder check in CheckStyleCodeStyleImporter #623

Open joao-martins-tdx opened 1 year ago

joao-martins-tdx commented 1 year ago

CheckStyleCodeStyleImporter doesn't seem to set the arrangement rules based on the DeclarationOrder check. It would be great if it did in order to prevent checkstyle errors when rearranging code.

jshiell commented 1 year ago

Thanks for the report. To be completely honest, it's not high on my priority list - the code style importer was a contribution, and the contributer has never contributed any fixes. But never say never.

nrayburn-tech commented 2 months ago

@jshiell would you happen to know how to apply the arrangement settings when importing? I implemented what I thought would work, but it doesn’t seem to change what the code style has from my manual testing. https://github.com/nrayburn-tech/checkstyle-idea/blob/272c6a6634340a0621aaae47da4dc477063d0908/src/main/java/org/infernus/idea/checkstyle/importer/modules/DeclarationOrderImporter.java#L86

Once I get that figured out, I can submit a PR for this.

jshiell commented 2 months ago

@nrayburn-tech sorry, I fear I'm little help here. As said, it was a contribution so my only exposure to this particular API has been as bug fixes for this particular feature!