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
It seems to only work with this set of scalafix annotations.
I would have expected each and every one of the .get calls to need // scalafix:ok Disable.get.
If I place it on the first one, I get
[warn] /home/nequi/dev/project/src/test/scala/Spec.scala:60:69: warning: [UnusedScalafixSuppression] Unused Scalafix suppression. This can be removed
[warn] NonEmptyString.from(postgresUrl).toOption.get, // scalafix:ok Disable.get
If I take them all away, I get
[error] /home/nequi/dev/project/src/test/scala/Spec.scala:61:50: error: [Disable.get] not a total function
[error] NonEmptyString.from(postgresUser).toOption.get,
[error] ^^^
[error] /home/nequi/dev/project/src/test/scala/Spec.scala:62:63: error: [Disable.get] not a total function
[error] Password(NonEmptyString.from(postgresPassword).toOption.get),
It seems rather confusing that the first call to .get is not caught and hence behaves differently from subsequent ones.
Note that I have only ever seen this in calls to .apply functions. If I were to apply the three values to vals beforehand, I would get Scalafix warnings for all three.
I am using Scalafix 0.6.0-M16 here. (I know it's not stable, but this is how I can send you issue reports :D)
The text was updated successfully, but these errors were encountered:
Bringing this over from scalacenter/scalafix#865
I have a code snippet in one of my tests (which is why I am allowing Option#get)
It seems to only work with this set of scalafix annotations.
I would have expected each and every one of the
.get
calls to need// scalafix:ok Disable.get
.If I place it on the first one, I get
If I take them all away, I get
It seems rather confusing that the first call to
.get
is not caught and hence behaves differently from subsequent ones.Note that I have only ever seen this in calls to
.apply
functions. If I were to apply the three values tovals
beforehand, I would get Scalafix warnings for all three.I am using Scalafix 0.6.0-M16 here. (I know it's not stable, but this is how I can send you issue reports :D)
The text was updated successfully, but these errors were encountered: