-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Bumping from 2.4.4 to 2.4.5, scalafmtCheckAll ignores badly formatted files if git is not setup and config says otherwise #189
Comments
@daddykotex should you remove |
I understand that, and git is used in all of our projects. The issue only
happen in this sbt-plugin test where the project directory is copied
outside of the project directory (into a temporary folder) to run the test.
It's similar to what you have in this project's test suite (p17) where you
init git before running the test.
Now, I could probably update the config but its generated and all of our
projects use git, so changing the behavior just for that test seems too
much. Instead, I run `$ exec git init` and setup git in that temporary
directory, within the test itself.
As I said, this issue can be closed, my goal was only to get ot out there
is someone has a similar issue.
…On Wed, Dec 15, 2021, 22:25 Albert Meltzer ***@***.***> wrote:
@daddykotex <https://github.com/daddykotex> should you remove project.git
= true if git is not set up and thus not used? the only purpose of that
setting is use git to determine which files should be formatted.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#189 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABH467GQUZXZKC24IKSXQNDURFL2FANCNFSM5KDYZ7TQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
@daddykotex understood, thank you. is there a recommended solution? |
also, it's possible that the next version will work. in #183, git is within Try and falls back to no filtering. |
We have a sbt-test, that runs in a layout like this:
I updated the
If the generated config did not contain |
Hi,
Thanks for sbt-scalafmt. We use it extensively. I create this issue mostly for documentation purposes because I guess we won't be the only to have this issue. We have an in-house sbt plugin that uses sbt-scalafmt. Bumping from 2.4.4 to 2.4.5, one of our test started to fail.
The test contains one source file that is badly formatted. When sbt runs the test, it copies everything into a new directory, where git is not setup. I understand that's why
scalafmtCheckAll
does not fail anymore: git is not setup, but our config says git is.Looking at the changelog, I can see #172 could have an effect on this.
I have a solution and it's fine for me.
The text was updated successfully, but these errors were encountered: