Abhijit Sarkar
Abhijit Sarkar

Reputation: 24593

How to skip running scalafmt on test code?

Scalafmt official plugin:

addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "1.5.1")

doesn't seem to offer any setting to disable running the checks on test code. There is an unofficial neo-sbt-scalafmt that has a setting scalafmtTestOnCompile but it seems not maintained anymore.

Is there a way to skip running scalafmt on test code using the official plugin?

Upvotes: 1

Views: 1626

Answers (1)

wtog
wtog

Reputation: 99

add this to your scalafmt.conf

project.excludeFilters = [
  com.xxx.test
]

Upvotes: 1

Related Questions