This also standardizes handling for code suggestions. Instead of manually inserting try: <code, you would just pass in the suggested code and delineate the suggestion's correctness with Applicability
MachineApplicable suggestions can be applied using selene --fix, MaybeIncorrect can be applied with vscode codeaction, and HasPlaceholders only shows up in output.
selene --fix applies suggestions iteratively, rerunning lints until there's no more suggestions. This handles the edge cases where applying a suggestion triggers another warning. It also handles overlapping suggestions where if multiple ranges overlap, it chooses the innermost one and defers the rest for the next iteration.
Closes #279
This also standardizes handling for code suggestions. Instead of manually inserting
try: <code
, you would just pass in the suggested code and delineate the suggestion's correctness withApplicability
MachineApplicable
suggestions can be applied usingselene --fix
,MaybeIncorrect
can be applied with vscode codeaction, andHasPlaceholders
only shows up in output.selene --fix
applies suggestions iteratively, rerunning lints until there's no more suggestions. This handles the edge cases where applying a suggestion triggers another warning. It also handles overlapping suggestions where if multiple ranges overlap, it chooses the innermost one and defers the rest for the next iteration.