Skip to content
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

Fix RedundantSyntax raw interpolator handling #1618

Merged
merged 1 commit into from
Jun 11, 2022

Conversation

gontard
Copy link
Contributor

@gontard gontard commented Jun 11, 2022

RedundantSyntax raised an exception for some characters
were escaped in a raw interpolator.

scalafix.internal.v1.FileException: unexpected error processing file /workspace/A.scala
Caused by: scala.StringContext$InvalidEscapeException: invalid escape '\+' not one of [\b, \t, \n, \f, \r, \\, \", \', \uxxxx] at index 4 in "(.*)\+.*@(.*)". Use \\ for literal \.
at scala.StringContext$.loop$2(StringContext.scala:417)
at scala.StringContext$.replace(StringContext.scala:429)
at scala.StringContext$.processEscapes(StringContext.scala:387)
at scalafix.internal.rule.RedundantSyntax$$anonfun$fix$1.applyOrElse(RedundantSyntax.scala:39)

RedundantSyntax raised an exception for some characters
were escaped in a raw interpolator.

scalafix.internal.v1.FileException: unexpected error processing file /workspace/A.scala
Caused by: scala.StringContext$InvalidEscapeException: invalid escape '\+' not one of [\b, \t, \n, \f, \r, \\, \", \', \uxxxx] at index 4 in "(.*)\+.*@(.*)". Use \\ for literal \.
at scala.StringContext$.loop$2(StringContext.scala:417)
at scala.StringContext$.replace(StringContext.scala:429)
at scala.StringContext$.processEscapes(StringContext.scala:387)
at scalafix.internal.rule.RedundantSyntax$$anonfun$fix$1.applyOrElse(RedundantSyntax.scala:39)
@gontard gontard marked this pull request as ready for review June 11, 2022 14:07
Copy link
Collaborator

@bjaglin bjaglin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@bjaglin bjaglin merged commit 57042bd into scalacenter:main Jun 11, 2022
@bjaglin
Copy link
Collaborator

bjaglin commented Jun 12, 2022

@gontard
Copy link
Contributor Author

gontard commented Jun 13, 2022

Available in the latest snapshot: https://scalacenter.github.io/scalafix/docs/users/installation.html#snapshot

Cool thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants