Skip to content

Commit 30d72d8

Browse files
committed
Add documentation for majorScalaVersion
1 parent 677415e commit 30d72d8

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
1212
## [Unreleased]
1313
### Changes
1414
* Converted `scalafmt` integration to use a compile-only source set. (fixes [#524](https://github.com/diffplug/spotless/issues/524))
15+
* `scalafmt` integration now has a configuration option `majorScalaVersion` that allows you to configure the Scala version that gets resolved from the maven artifact. [#1283](https://github.com/diffplug/spotless/pull/1283)
1516
* Add the `ktlint` rule in error messages when `ktlint` fails to apply a fix ([#1279](https://github.com/diffplug/spotless/pull/1279))
1617

1718
## [2.28.1] - 2022-08-10

plugin-gradle/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,8 @@ spotless {
388388
```gradle
389389
spotless {
390390
scala {
391-
// version and configFile are both optional
392-
scalafmt('2.6.1').configFile('scalafmt.conf')
391+
// version and configFile, majorScalaVersion are all optional
392+
scalafmt('2.6.1').configFile('scalafmt.conf').majorScalaVersion('2.13')
393393
```
394394

395395
<a name="applying-to-cc-sources"></a>

plugin-maven/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ Groovy-Eclipse formatting errors/warnings lead per default to a build failure. T
395395
<scalafmt>
396396
<version>2.0.1</version> <!-- optional -->
397397
<file>${project.basedir}/scalafmt.conf</file> <!-- optional -->
398+
<majorScalaVersion>2.13</majorScalaVersion> <!-- optional -->
398399
</scalafmt>
399400
```
400401

0 commit comments

Comments
 (0)