Generated metals.sbt fails scalafmtSbtCheck
joroKr21 opened this issue · comments
Georgi Krastev commented
Describe the bug
Often when I work on a project within Metals, it's disrupting my workflow.
- I open my project in Metals
- I make a change in
build.sbt
- I click on the prompt by Metals to reimport the project
- It does stuff and (re)generates
metals.sbt
- I'm running an
sbt
session separately to test etc. - Now my validation command fails because of
scalafmtSbtCheck
- I need to run
scalafmtSbt
to fix it - Now I have to reload my
sbt
session again
Basically it's too many steps I don't want to think about.
I added a workaround in .scalafmt.conf
but by default I don't wanna care:
project.excludePaths = ["glob:**/metals.sbt"]
Expected behavior
It works by default.
Operating system
macOS
Editor/Extension
VS Code
Version of Metals
v1.29.0
Extra context or search terms
No response
Tomasz Godzik commented
Thanks for reporting! We should add // scalafmt:off
(I think this is the case) to make sure this doesn't fail the check