-
Notifications
You must be signed in to change notification settings - Fork 185
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
Make NoAutoTupling fixes the insertion of unit #1452
Conversation
- refactor tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looking at #352, it does look like it's something we want(ed)! Regarding withConfiguration
, I guess it would be good to add it to guide usage of the rules as it's getting tricky to set up the right scalacOptions
indeed!
@@ -0,0 +1,24 @@ | |||
package test.noAutoTupling | |||
|
|||
class NoUnitInsertion { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so if I understand well:
- this was removed by mistake in d5d23db#diff-fd705cc22acdf8f3dc8262c143dd9ff3a6afcdb914b8dc0cd02479258fcdbe3e
- testkit seeing an input without an output is not triggering a failure as it's a valid use-case for linters (
assert
syntax in input file comments) - The TODOs introduced in Migrate to 2.13 #1118 in
NoAutoTupling
was a subset of this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I didn't know why this test wasn't running. I deleted it by mistake!
- While grouping the tests together for each rule, I remembered that a small thing was missing to make this rule working. Maybe I will go throw my previous Todo and see what I can fix.
- disable `-Xfatal-warnings`. Unfortunately, the Scala compiler does not support | ||
finer grained control over the severity level per message kind. See | ||
[scalameta/scalameta#924](https://github.com/scalameta/scalameta/issues/924) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you remove that following scalacenter/sbt-scalafix#196? It's specific to sbt-scalafix, but I guess it's not worth mentioning "just" for the other clients, so I am inclined to say that we should ignore mentions of -Xfatal-warnings
considering sbt-scalafix is the main client.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes and I forgot about the other clients. I think the other client should mention it (or are already menting it)
I don't know if want to insert
()
when we have this kind of warnings (that are only reported by-deprecation
)The test was called NoUnitInsertion. Not clear for me if we want that or not. In the other hand, even if it's not a behavior we want, noAutoTupling insert (), if the user has added -deprecation in his options. It wasn't working for 2.13 since the warning message changed from
Adaptation ...
toadaptation ...
for unit insertions.withConfiguration
: should we do the same than in removeUnused ?