coala-atom icon indicating copy to clipboard operation
coala-atom copied to clipboard

Add autofix option

Open AbdealiLoKo opened this issue 9 years ago • 2 comments

AbdealiLoKo avatar Feb 09 '16 18:02 AbdealiLoKo

From the conversation with @Arcanemagus -

There are three different methods to go about that: If your program supports just running on a file with a flag you can register a command that users can call that will trigger a fix, or you can have an option to fix on save (by registering an onWillSave handler yourself) The third one is the best... but isn't implemented yet - atom-community/linter#1049

You can see how autofix support was added to linter-eslint here: AtomLinter/linter-eslint#415

AbdealiLoKo avatar Feb 10 '16 17:02 AbdealiLoKo

Btw, Linter itself doesn't yet support the Autofix API detailed in that issue, however Nuclide (which uses the same API and consumes linter plugins as well) does currently have support, so the API is finalized, just not implemented in Linter yet.

Arcanemagus avatar Feb 10 '16 17:02 Arcanemagus