File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -1601,22 +1601,13 @@ By default, `spotless:check` is bound to the `verify` phase. You might want to
16011601
16021602## Can I apply Spotless to specific files?
16031603
1604- There are two options:
1605-
1606- ### Pattern
16071604You can target specific files by setting the ` spotlessFiles ` project property to a comma-separated list of file patterns:
1608- ```
1609- cmd> mvn spotless:apply -DspotlessFiles="src.main.java.com.example.*, .+Config.*\.java"
1610- ```
1611- The patterns are matched using ` String#matches(String) ` against the absolute file path.
16121605
1613- ### IDE Hook
1614- You can specify a single file by providing the ` spotlessIdeHook ` argument, which accepts the absolute path of the file.
16151606```
1616- cmd> mvn spotless:apply -DspotlessIdeHook="C:\my-project\src\main\java\com\example\Application.java"
1617-
1607+ cmd> mvn spotless:apply -DspotlessFiles=my/file/pattern.java,more/generic/.*-pattern.java
16181608```
1619- This option ignores the ratchetFrom property.
1609+
1610+ The patterns are matched using ` String#matches(String) ` against the absolute file path.
16201611
16211612<a name =" examples " ></a >
16221613
You can’t perform that action at this time.
0 commit comments