Skip to content

Commit

Permalink
Merge branch 'master' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtw authored and nedtw committed Sep 13, 2021
2 parents 07191e0 + 9293e6d commit 738f8ad
Showing 1 changed file with 23 additions and 22 deletions.
45 changes: 23 additions & 22 deletions plugin-maven/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ To use it in your pom, just [add the Spotless dependency](https://search.maven.o
optionally, Spotless can set copyright years by digging
through git history (see "license" section below) -->
<licenseHeader>
<content>/* (C)$YEAR */</content> <!-- or <file>${basedir}/license-header</file> -->
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
</licenseHeader>
</java>
</configuration>
Expand Down Expand Up @@ -178,7 +178,7 @@ any other maven phase (i.e. compile) then it can be configured as below;

<importOrder /> <!-- standard import order -->
<importOrder> <!-- or a custom ordering -->
<order>java,javax,org,com,com.diffplug,</order> <!-- or use <file>${basedir}/eclipse.importorder</file> -->
<order>java,javax,org,com,com.diffplug,</order> <!-- or use <file>${project.basedir}/eclipse.importorder</file> -->
<!-- You probably want an empty string at the end - all of the
imports you didn't specify explicitly will go there. -->
</importOrder>
Expand All @@ -190,7 +190,7 @@ any other maven phase (i.e. compile) then it can be configured as below;
<prettier /> <!-- has its own section below -->

<licenseHeader>
<content>/* (C)$YEAR */</content> <!-- or <file>${basedir}/license-header</file> -->
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
</licenseHeader>
</java>
</configuration>
Expand All @@ -215,7 +215,7 @@ any other maven phase (i.e. compile) then it can be configured as below;
```xml
<eclipse>
<version>4.13.0</version> <!-- optional -->
<file>${basedir}/eclipse-formatter.xml</file> <!-- optional -->
<file>${project.basedir}/eclipse-formatter.xml</file> <!-- optional -->
</eclipse>
```

Expand All @@ -236,15 +236,16 @@ any other maven phase (i.e. compile) then it can be configured as below;

<importOrder /> <!-- standard import order -->
<importOrder> <!-- or a custom ordering -->
<order>java,javax,org,com,com.diffplug,</order> <!-- or use <file>${basedir}/eclipse.importorder</file> -->
<order>java,javax,org,com,com.diffplug,</order> <!-- or use <file>
/eclipse.importorder</file> -->
<!-- You probably want an empty string at the end - all of the
imports you didn't specify explicitly will go there. -->
</importOrder>

<greclipse /> <!-- has its own section below -->

<licenseHeader>
<content>/* (C)$YEAR */</content> <!-- or <file>${basedir}/license-header</file> -->
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
</licenseHeader>
</java>
</configuration>
Expand All @@ -257,7 +258,7 @@ any other maven phase (i.e. compile) then it can be configured as below;
```xml
<greclipse>
<version>4.13.0</version> <!-- optional -->
<file>${basedir}/greclipse.properties</file> <!-- optional -->
<file>${project.basedir}/greclipse.properties</file> <!-- optional -->
</greclipse>
```

Expand All @@ -284,7 +285,7 @@ Groovy-Eclipse formatting errors/warnings lead per default to a build failure. T
<prettier /> <!-- has its own section below -->

<licenseHeader>
<content>/* (C)$YEAR */</content> <!-- or <file>${basedir}/license-header</file> -->
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
</licenseHeader>
</kotlin>
</configuration>
Expand Down Expand Up @@ -344,7 +345,7 @@ Groovy-Eclipse formatting errors/warnings lead per default to a build failure. T
<scalafmt /> <!-- has its own section below -->

<licenseHeader>
<content>/* (C)$YEAR */</content> <!-- or <file>${basedir}/license-header</file> -->
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
<delimiter>package </delimiter> <!--
note the 'package ' argument - this is a regex which identifies the top
of the file, be careful that all of your sources have a package declaration,
Expand All @@ -361,7 +362,7 @@ Groovy-Eclipse formatting errors/warnings lead per default to a build failure. T
```xml
<scalafmt>
<version>2.0.1</version> <!-- optional -->
<file>${basedir}/scalafmt.conf</file> <!-- optional -->
<file>${project.basedir}/scalafmt.conf</file> <!-- optional -->
</scalafmt>
```

Expand All @@ -383,7 +384,7 @@ Groovy-Eclipse formatting errors/warnings lead per default to a build failure. T
<eclipseCdt /> <!-- has its own section below -->

<licenseHeader>
<content>/* (C)$YEAR */</content> <!-- or <file>${basedir}/license-header</file> -->
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
</licenseHeader>
</cpp>
</configuration>
Expand All @@ -396,7 +397,7 @@ Groovy-Eclipse formatting errors/warnings lead per default to a build failure. T
```xml
<eclipseCdt>
<version>4.13.0</version> <!-- optional -->
<file>${basedir}/eclipse-cdt.xml</file> <!-- optional -->
<file>${project.basedir}/eclipse-cdt.xml</file> <!-- optional -->
</eclipseCdt>
```

Expand Down Expand Up @@ -451,7 +452,7 @@ Groovy-Eclipse formatting errors/warnings lead per default to a build failure. T
<antlr4formatter /> <!-- has its own section below -->

<licenseHeader>
<content>/* (C)$YEAR */</content> <!-- or <file>${basedir}/license-header</file> -->
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
</licenseHeader>
</antlr4>
</configuration>
Expand Down Expand Up @@ -525,7 +526,7 @@ sql.formatter.indent.size=4
<prettier/> <!-- has its own section below -->

<licenseHeader>
<content>/* (C)$YEAR */</content> <!-- or <file>${basedir}/license-header</file> -->
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
<delimiter>(import|const|declare|export|var) </delimiter> <!--
note the '(import|const|...' argument - this is a regex which identifies the top
of the file, be careful that all of your sources have a suitable top-level declaration,
Expand All @@ -552,10 +553,10 @@ The auto-discovery of config files (up the file tree) will not work when using t
<convertTabsToSpaces>true</convertTabsToSpaces>
</config>
<!-- // or according to tsfmt-parameters: https://github.com/vvakame/typescript-formatter/blob/7764258ad42ac65071399840d1b8701868510ca7/lib/index.ts#L27L34 -->
<tsconfigFile>${basedir}/tsconfig.json</tsconfigFile>
<tslintFile>${basedir}/tslint.json</tslintFile>
<vscodeFile>${basedir}/vscode.json</vscodeFile>
<tsfmtFile>${basedir}/tsfmt.json</tsfmtFile>
<tsconfigFile>${project.basedir}/tsconfig.json</tsconfigFile>
<tslintFile>${project.basedir}/tslint.json</tslintFile>
<vscodeFile>${project.basedir}/vscode.json</vscodeFile>
<tsfmtFile>${project.basedir}/tsfmt.json</tsfmtFile>
</tsfmt>
```

Expand Down Expand Up @@ -596,7 +597,7 @@ You can use prettier in any language-specific format, but usually you will be cr
</property>
</devDependencyProperties>
<!-- Specify config file and/or inline config, the inline always trumps file -->
<configFile>${basedir}/path/to/configfile</configFile>
<configFile>${project.basedir}/path/to/configfile</configFile>
<config>
<useTabs>true</useTabs>
</config>
Expand Down Expand Up @@ -715,8 +716,8 @@ Alternatively you can supply spotless with a location of the `.npmrc` file to us
<eclipseWtp>
<type>XML</type> <!-- specify the WTP formatter type (XML, JS, ...) -->
<files> <!-- specify the configuration for the selected type -->
<file>${basedir}/xml.prefs</file>
<file>${basedir}/additional.properties</file>
<file>${project.basedir}/xml.prefs</file>
<file>${project.basedir}/additional.properties</file>
</files>
<version>4.13.0</version> <!-- optional -->
</eclipseWtp>
Expand Down Expand Up @@ -787,7 +788,7 @@ Spotless can inject a license header into your files, including populating an ac

```xml
<licenseHeader> <!-- specify either content or file, but not both -->
<content>/* (C)$YEAR */</content> <!-- or <file>${basedir}/license-header</file> -->
<content>/* (C)$YEAR */</content> <!-- or <file>${project.basedir}/license-header</file> -->
<delimiter>#</delimiter> <!-- content until first occurrence of the delimiter regex will be interpreted as header section -->
</licenseHeader>
```
Expand Down

0 comments on commit 738f8ad

Please sign in to comment.