autoCorrect
Whether this rule should correct the code it reports on.
Only rules implementing AutoCorrectable can correct anything, so for every other rule this is always false. For those that can, the value is resolved in priority order:
the
autoCorrectproperty of the rulethe
autoCorrectproperty of the parent rule settrue, as a rule which is able to correct is expected to do so
The --auto-correct CLI flag (and its Gradle counterpart) remains the master switch: when it is off, detekt forces autoCorrect to false for every rule regardless of configuration.