Open jimmylai opened 4 years ago
Here's a rather janky way to get VSCode diagnostics on load/save: https://github.com/llllvvuu/efm-tool-definitions.yaml/blob/cb90f12516a27a8e1820600afe94229c04bb5c19/tool-definitions.yaml#L42-L55
The above becomes lint-as-you-type if https://github.com/Instagram/Fixit/pull/388 is merged.
That leaves the remaining task of supporting Code Actions, which requires implementing LSP: #387 (EDIT: PR up)
Integrate Fixit into a VSCode plugin (and potentially any other IDE), so developer can easily install it and use it on VSCode.
Fixit can be run automatically when developers save source file updates and show warning inline with wavy underline or lightbulb UIs.
Then developers can click on the UI or press some shortcut to apply autofix.
Some helper is provided to make this easy to implement, e.g.
lint_file
returns a list of violation reports (BaseLintRuleReport) and providespatch
property when autofix is available.https://github.com/Instagram/Fixit/blob/master/fixit/rule_lint_engine.py#L54