Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Actionable Diagnostics from Scala 2.13.12+ #793

Open
saeltz opened this issue Sep 18, 2023 · 2 comments
Open

Support Actionable Diagnostics from Scala 2.13.12+ #793

saeltz opened this issue Sep 18, 2023 · 2 comments

Comments

@saeltz
Copy link
Collaborator

saeltz commented Sep 18, 2023

Scala 2.13.12 added actionable diagnostics to the compiler and and info/warning/error messages.
We needed to change our tests in #789 to accommodate that change.
In future versions of Scapegoat, we could also support the actionable diagnostics in a way that we suggest a fix for rules where it makes sense.
An example: AvoidToMinusOne inspection would automatically suggest to rewrite x to n-1 to x until n.

Discuss: This would not work for older Scala versions. So we either only support Scapegoat for newer Scala versions or somehow create an internal intermediate model that maps to the Scala version's info message.

@saeltz saeltz changed the title Support Actionable Diagnostics from 2.13.12+ Support Actionable Diagnostics from Scala 2.13.12+ Sep 18, 2023
@domdorn
Copy link

domdorn commented Sep 21, 2023

is this required to get an initial release for scala 2.13.12 ? from what I got from this ticket, this is additional functionality?

@saeltz
Copy link
Collaborator Author

saeltz commented Sep 21, 2023

is this required to get an initial release for scala 2.13.12 ?

No.

from what I got from this ticket, this is additional functionality?

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants