New feature: disable autofix for specific rules in .editorConfig

I think I understand now. I had missed the “Fix all warning and errors set in EditorConfig” Code cleanup entry, which is what ropes in the autofix from Sonar’s rules I think.

So, to summarize:

  • If Code cleanup is configured to apply all fixes from EditorConfig
  • And Apply Code cleanup on save is set
  • And rule S1172 (for example) is not silenced

Then, upon saving the file the undesired (because they are broken) auto fixes are applied, resulting in broken code.

Therefore, you would like fine-grained control over which autofixes are activated in EditorConfig for Sonar’s rules.
This would allow deactivating fixes that you do not want while keeping others.

Is that correct?

For the time being, I would probably remove the “Fix all warning and errors set in EditorConfig” and “Remove unused variables” entries from the Code cleanup configuration to limit the damage on your code base.