Skip to content
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

ScalafmtDynamic: fix handling of .md files #2918

Merged
merged 1 commit into from
Nov 23, 2021

Conversation

kitbellew
Copy link
Collaborator

@kitbellew kitbellew commented Nov 23, 2021

When handling of .md files was added to Scalafmt.formatCode method (see #2563), ScalafmtDynamic.tryFormat should have added support for versions before 3.0.0-rc7 (which came out with that change), instead of 2.6.3 which added support for .sbt and .sc.

The logic in ScalafmtDynamic needs to complement (rather than mirror) the logic in Scalafmt.formatCode.

When handling of `.md` files was added to `Scalafmt.formatCode` method
(see scalameta#2563), `ScalafmtDynamic.tryFormat` should have added support for
versions before 3.0.0-rc7 (which came out with that change), instead of
2.6.3 which added support for `.sbt` and `.sc`.

The logic in `ScalafmtDynamic` needs to complement (rather than mirror)
the logic in `Scalafmt.formatCode`.
Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

I think you wanted to reference https://github.com/scalameta/scalafmt/pull/2653/files instead.

@kitbellew kitbellew merged commit 336a4d8 into scalameta:master Nov 23, 2021
@kitbellew kitbellew deleted the 2918 branch November 23, 2021 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants