scalafix icon indicating copy to clipboard operation
scalafix copied to clipboard

DisableSyntax.regex reports error on // scalafix:ok regex

Open olafurpg opened this issue 7 years ago • 1 comments
trafficstars

See https://github.com/scalacenter/scalafix/pull/500/files/9ae607183ec4721f6aefdd3cfc339535e347838e#diff-439023eeb6466236b27366980c2da737

If you disallow for example println, then it should be possible to escape that error with // scalafix:ok println. However, scalafix will report an error on "printlnin// scalafix:ok println`. It would be nice if scalafix handled this case by checking that the offensive location does not follow the string "scalafix:ok " or "scalafix:off ".

olafurpg avatar Dec 15 '17 10:12 olafurpg

Not yet implemented. for the println example, to disable it, you need right now to do:

  println("Hello, World!") // scalafix:ok DisableSyntax
  println("Hello, World!") // scalafix:ok

mlachkar avatar Jan 27 '21 15:01 mlachkar