Page MenuHomePhorge

Looking for docs/info on SEVERITY_AUTOFIX
Closed, ResolvedPublic

Asked by blundell on Aug 9 2022, 09:45.


I've got my linter setup to run KtLint and then pass back the results to arc

KtLint will update my files to fix minor problems, and so I assume using SEVERITY_AUTOFIX tells arc that this was an issue but now its fixed. Then arc can offer to commit/amend the change?

$message->setLine($error->line + 1);
$message->setChar($error->column_start + 1);

However I am see'ing some strange behaviour where code is getting mangled and removed/replaced by arc.

Am I mistaken and this is not how autofix works? Is arc taking the original text and replacement text and also attempting to change my code?

I read the original patch: but that did not clear it up for me.

Does arc modify your code when you set the severity to AUTOFIX? And if so can I disable that whilst still showing automatically fixed lint errors and having arc prompt to amend the commit?


Updated 709 Days Ago

Of course, as soon as you ask a question you figure the answer.

arc lint --never-apply-patches

never-apply-patches stops arc from patching :-) (because Ktlint already did it).

The source which shows arc patching the changes:

New Answer


This question has been marked as closed, but you can still leave a new answer.