[Chapel Merge] Allow users to select between multiple fixits

Branch: refs/heads/main
Revision: 6c88758a8e664611c8c8224bfa6968c4bb574d2a
Author: jabraham17
Link: Allow users to select between multiple fixits by jabraham17 · Pull Request #24744 · chapel-lang/chapel · GitHub
Log Message:
Allow users to select between multiple fixits (#24744)

Follow on to Add auto fixits to Chapel linter by jabraham17 · Pull Request #24663 · chapel-lang/chapel · GitHub

This PR allows rules to define multiple fixits for a single rule,
allowing rule writers to give multiple ways to resolve an issue

For example:

This PR changes how Fixit works. A Fixit is made of multiple Edits (to
support Fixits editing multiple places at once) and rules can define
multiple Fixits. This PR uses that functionally to add a Fixits for
chplcheck.ignore. For example, on UnusedLoopIndex warnings, users
can either remove the index or add chplcheck.ignore, this PR provides
both options.

This PR also adds a --interactive command line flag to let non-lsp
users select between multiple fixits.

[Reviewed by @DanilaFe]

Compare: Comparing 27beea5237e03d460b2c6cdd7a87c95351b70dbc...02895442bfe47eb7af45236589d91fc460824e14 · chapel-lang/chapel · GitHub

Diff:
M test/chplcheck/MethodsAfterFields.chpl
M test/chplcheck/MethodsAfterFields.good
A test/chplcheck/MethodsAfterFields.good-fixit
M test/chplcheck/MisleadingIndentation.good
A test/chplcheck/MisleadingIndentation.good-fixit
A test/chplcheck/fixit-interactive/COMPOPTS
A test/chplcheck/fixit-interactive/NOEXEC
A test/chplcheck/fixit-interactive/PREDIFF
A test/chplcheck/fixit-interactive/SKIPIF
A test/chplcheck/fixit-interactive/errorHandling.chpl
A test/chplcheck/fixit-interactive/errorHandling.good
A test/chplcheck/fixit-interactive/errorHandling.input
A test/chplcheck/fixit-interactive/simple.chpl
A test/chplcheck/fixit-interactive/simple.good
A test/chplcheck/fixit-interactive/simple.input
M tools/chapel-py/src/chapel/init.py
M tools/chplcheck/src/chplcheck.py
M tools/chplcheck/src/driver.py
M tools/chplcheck/src/fixits.py
M tools/chplcheck/src/lsp.py
M tools/chplcheck/src/rule_types.py
M tools/chplcheck/src/rules.py
https://github.com/chapel-lang/chapel/pull/24744.diff