You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suppose that the /* scalafix:ok */ is unneeded, i.e. it is not suppressing anything. We run scalafix on the file with --auto-suppress-linter-errors. Scalafix attempts to suppress the warning emitted by the UnusedScalafixSuppression check, and we end up with
We run it again, and now have four suppressions. Each time the number of (unused) suppressions doubles. This is basically opposite the intent of UnusedScalafixSuppression and is not useful. It is, in fact, actively detrimental: whenever I add a new rule, I run scalafix with --auto-suppress-linter-errors, and then do a global find-and-replace from /* scalafix:ok */ to /* scalafix:ok NameOfRule */ (on that note, it'd be awesome if the automatically added suppression comments would include the rule name themselves). Having new /* scalafix:ok */s get added to all the unused suppressions, in addition to the violations of the new rule, makes that more complicated.
This wouldn't be such a problem if I just removed the unused suppressions, but that's also not an option. I run different rulesets under different circumstances, so suppressions of not included rules get flagged as unused even though they're still needed
The text was updated successfully, but these errors were encountered:
Take the following example file:
Suppose that the
/* scalafix:ok */
is unneeded, i.e. it is not suppressing anything. We run scalafix on the file with--auto-suppress-linter-errors
. Scalafix attempts to suppress the warning emitted by theUnusedScalafixSuppression
check, and we end up withWe run it again, and now have four suppressions. Each time the number of (unused) suppressions doubles. This is basically opposite the intent of
UnusedScalafixSuppression
and is not useful. It is, in fact, actively detrimental: whenever I add a new rule, I run scalafix with--auto-suppress-linter-errors
, and then do a global find-and-replace from/* scalafix:ok */
to/* scalafix:ok NameOfRule */
(on that note, it'd be awesome if the automatically added suppression comments would include the rule name themselves). Having new/* scalafix:ok */
s get added to all the unused suppressions, in addition to the violations of the new rule, makes that more complicated.This wouldn't be such a problem if I just removed the unused suppressions, but that's also not an option. I run different rulesets under different circumstances, so suppressions of not included rules get flagged as unused even though they're still needed
The text was updated successfully, but these errors were encountered: