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

ScalafmtSessionFactory usage #100

Merged
merged 4 commits into from
May 12, 2020
Merged

ScalafmtSessionFactory usage #100

merged 4 commits into from
May 12, 2020

Conversation

poslegm
Copy link
Collaborator

@poslegm poslegm commented May 11, 2020

Fixes #96

@poslegm poslegm requested a review from kitbellew May 11, 2020 17:51
import java.nio.file.Path
import org.scalafmt.interfaces.{Scalafmt, ScalafmtSession}

class PluginInstanceSession(config: Path, instance: Scalafmt)
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. should it be package-private?
  2. perhaps rename to something like LegacyScalafmtSession or CompatibilityScalafmtSession or EmulatedScalafmtSession?

globalInstance
.withReporter(reporter)
.withMavenRepositories(repositories: _*)
.withRespectProjectFilters(true) match {
Copy link
Contributor

Choose a reason for hiding this comment

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

this line wasn't there before. probably a good change. could it potentially cause some complaints?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Looks like it's on-by-default. Just explicitly declare this setting because sbt plugin hasn't other inputs than filters specified in config.

@poslegm poslegm requested a review from kitbellew May 12, 2020 10:11
@poslegm poslegm merged commit bf481bc into scalameta:master May 12, 2020
@poslegm poslegm deleted the factory branch May 12, 2020 11:16
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.

Use ScalafmtSession
2 participants