We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
val a = 4 val b = 0 val d = scala.util.Try { a / b }.toOption val list = 42 :: d.get :: Nil
Quite contrived example which I made while testing the gitlab code quality integration. This doesn't flag for using Option.get.
The text was updated successfully, but these errors were encountered:
Interesting. I am wondering what makes Cons special here:
Cons
scapegoat/src/main/scala/com/sksamuel/scapegoat/inspections/option/OptionGet.scala
Line 28 in 6b6f4e2
Sorry, something went wrong.
It even fails on the very simple:
val list = None.get :: Nil
This is a ValDef in the macro, containing a Block tree type with the following content:
ValDef
Block
List[Nothing] { final <synthetic> <artifact> val rassoc$1: Nothing = scala.None.get; scala.`package`.Nil.::[Nothing](rassoc$1) }
I can't find a way to match on the content of the Block. It somehow isn't a Select.
Select
No branches or pull requests
Quite contrived example which I made while testing the gitlab code quality integration. This doesn't flag for using Option.get.
The text was updated successfully, but these errors were encountered: