-
Notifications
You must be signed in to change notification settings - Fork 2
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
scala.MatchError: 1 (of class scala.meta.Lit$LitImpl) #2
Comments
Oh, thanks for reporting! Yes, I purposely didn't put a catch-all because I
wanted to see how and where it would fail (so that I can create the proper
tag, or ignore it otherwise).
I'll fix this as soon as I get to my PC.
…On Fri, Jul 14, 2017, 05:56 Ólafur Páll Geirsson ***@***.***> wrote:
git clone https://github.com/scalacenter/scalafix.git
cd scalafix
coursier launch co.pjrt:stags-cli_2.12:0.1.1 -- ./
Exception in thread "main" scala.MatchError: 1 (of class scala.meta.Lit$LitImpl)
at co.pjrt.stags.TagGenerator$.getFromPats(TagGenerator.scala:127)
at co.pjrt.stags.TagGenerator$.getFromPat$1(TagGenerator.scala:118)
at co.pjrt.stags.TagGenerator$.$anonfun$getFromPats$2(TagGenerator.scala:124)
at scala.collection.TraversableLike.$anonfun$flatMap$1(TraversableLike.scala:241)
at scala.collection.immutable.List.foreach(List.scala:389)
at scala.collection.TraversableLike.flatMap(TraversableLike.scala:241)
at scala.collection.TraversableLike.flatMap$(TraversableLike.scala:238)
at scala.collection.immutable.List.flatMap(List.scala:352)
at co.pjrt.stags.TagGenerator$.getFromPats(TagGenerator.scala:124)
at co.pjrt.stags.TagGenerator$.$anonfun$tagsForStatement$1(TagGenerator.scala:71)
at scala.collection.TraversableLike.$anonfun$flatMap$1(TraversableLike.scala:241)
at scala.collection.immutable.List.foreach(List.scala:389)
at scala.collection.TraversableLike.flatMap(TraversableLike.scala:241)
at scala.collection.TraversableLike.flatMap$(TraversableLike.scala:238)
Seems like
https://github.com/pjrt/stags/blob/dcb70615607fb46e9becc18f68ff66c35f7dc3c3/stags/src/main/scala/co/pjrt/stags/TagGenerator.scala#L130
is missing a fallback.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABiRtBQOeCgEf3Eukjs4NEer3Qc7T_J-ks5sNzsvgaJpZM4OYDop>
.
|
If you want a large corpus you can try https://github.com/olafurpg/scala-repos/ Alternatively, scalameta testkit provides a nice interface to run custom analysis on that same corpus https://github.com/scalameta/scalameta/blob/1bd511158352bd6375bdb1e0e28395e76513094f/scalameta/testkit/src/main/scala/scala/meta/testkit/SyntaxAnalysis.scala |
Nice, thanks! I'll see if I can integrate it into my tests. |
Fixed. I'll push to maven later today (or tomorrow. idk if I'll have time today). |
Thanks for the fix! I'm slowly trying to move from IJ to vim and I hope to use stags to smoothen the transition 😄 |
@olafurpg |
Awesome, just ran it on the scalafix repo with no problem 💯 |
Seems like
stags/stags/src/main/scala/co/pjrt/stags/TagGenerator.scala
Line 130 in dcb7061
The text was updated successfully, but these errors were encountered: