Skip to content

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

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

Closed
bjaglin opened this issue May 24, 2021 · 1 comment · Fixed by scalacenter/sbt-scalafix#485

Comments

@bjaglin
Copy link
Collaborator

bjaglin commented May 24, 2021

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
Copy link
Collaborator Author

bjaglin commented Apr 15, 2025

I am going for (1) in the end since it's more useful. I added an info log to address the visibility concern.

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

Successfully merging a pull request may close this issue.

1 participant