scalafix icon indicating copy to clipboard operation
scalafix copied to clipboard

sbt-scalafix: better support for `skip := true` when running semantic rules

Open bjaglin opened this issue 4 years ago • 0 comments
trafficstars

Originally reported on gitter.

When skip is set to true on the for a given project/configuration, compilation is skipped (through the compile / skip lookup), resulting in missing semanticdb files if semantic rules are requested.

We should either

  1. honor skip when set at the configuration level and disable scalafix
  2. force compilation by enforcing compile / skip to false when compile is triggered by scalafix

Even though (2) might result in scalafix failing because of a compilation error, I think it's better than silently ignoring the project. skip semantics are unclear even for sbt built-in keys, so as a user, it's hard to know how plugins would behave.

bjaglin avatar May 24 '21 16:05 bjaglin