Fork me on GitHub

editorconfig:format

Full name:

org.ec4j.maven:editorconfig-maven-plugin:0.2.0:format

Description:

Formats a set of files so that they comply with rules defined in .editorconfig files.

Attributes:

  • Requires a Maven project to be executed.
  • The goal is thread-safe and supports parallel builds.
  • Since version: 0.0.1.

Optional Parameters

Name Type Since Description
<addLintersFromClassPath> boolean 0.0.1 If set to true, the class path will be scanned for implementations of org.ec4j.lint.api.Linter and all org.ec4j.lint.api.Linters found will be added to linters with their default includes and excludes.
Default: true
User Property: editorconfig.addLintersFromClassPath
<backup> boolean 0.0.1 If true, a backup file will be created for every file that needs to be formatted just before the formatted version is stored. If false, no backup is done and the files are formatted in place. See also backupSuffix.
Default: false
User Property: editorconfig.backup
<backupSuffix> String 0.0.1 A suffix to append to a file name to create its backup. See also backup.
Default: .bak
User Property: editorconfig.backupSuffix
<encoding> String 0.0.1 The default encoding of files selected by includes and excludes. This value can be overriden by a charset property of an .editorconfig file.
Default: ${project.build.sourceEncoding}
User Property: editorconfig.encoding
<excludeNonSourceFiles> boolean 0.0.3 If true the default exclude patterns (that exclude binary files and other non-source code files, see org.ec4j.lint.api.Constants.DEFAULT_EXCLUDES) will be prepended to the list of excludes. Otherwise, no defaults will be prepended to excludes.
Default: true
User Property: editorconfig.excludeNonSourceFiles
<excludeSubmodules> boolean 0.0.3 If true the Maven submodule directories of the current project will be prepended to the list of excludes. Otherwise, the module directories will not be excluded.
Default: true
User Property: editorconfig.excludeSubmodules
<excludes> List<String> 0.0.1 File patterns to exclude from the set of files to process. The patterns are relative to the current project's baseDir. See also excludeNonSourceFiles and excludeSubmodules.
User Property: editorconfig.excludes
<excludesFile> File 0.1.0 File containing exclude patterns to add to any existing exclude patterns. Empty lines and lines starting with # are ignored.
User Property: editorconfig.excludesFile
<failOnNoMatchingProperties> boolean 0.0.1 If true the plugin execution will fail with an error in case no single .editorconfig property matches any file of the current Maven project - this usually means that there is no .editorconfig file in the whole source tree. If false, only a warning is produced in such a situation.
Default: true
User Property: editorconfig.failOnNoMatchingProperties
<includes> List<String> 0.0.1 File patterns to include into the set of files to process. The patterns are relative to the current project's baseDir.
Default: **
User Property: editorconfig.includes
<linters> List<LinterConfig> 0.0.1 Set the includes and excludes for the individual org.ec4j.lint.api.Linters
<skip> boolean 0.0.1 If true the execution of the Mojo will be skipped; otherwise the Mojo will be executed.
Default: false
User Property: editorconfig.skip

Parameter Details

<addLintersFromClassPath>

If set to true, the class path will be scanned for implementations of org.ec4j.lint.api.Linter and all org.ec4j.lint.api.Linters found will be added to linters with their default includes and excludes.
  • Type: boolean
  • Since: 0.0.1
  • Required: No
  • User Property: editorconfig.addLintersFromClassPath
  • Default: true

<backup>

If true, a backup file will be created for every file that needs to be formatted just before the formatted version is stored. If false, no backup is done and the files are formatted in place. See also backupSuffix.
  • Type: boolean
  • Since: 0.0.1
  • Required: No
  • User Property: editorconfig.backup
  • Default: false

<backupSuffix>

A suffix to append to a file name to create its backup. See also backup.
  • Type: java.lang.String
  • Since: 0.0.1
  • Required: No
  • User Property: editorconfig.backupSuffix
  • Default: .bak

<encoding>

The default encoding of files selected by includes and excludes. This value can be overriden by a charset property of an .editorconfig file.
  • Type: java.lang.String
  • Since: 0.0.1
  • Required: No
  • User Property: editorconfig.encoding
  • Default: ${project.build.sourceEncoding}

<excludeNonSourceFiles>

If true the default exclude patterns (that exclude binary files and other non-source code files, see org.ec4j.lint.api.Constants.DEFAULT_EXCLUDES) will be prepended to the list of excludes. Otherwise, no defaults will be prepended to excludes.
  • Type: boolean
  • Since: 0.0.3
  • Required: No
  • User Property: editorconfig.excludeNonSourceFiles
  • Default: true

<excludeSubmodules>

If true the Maven submodule directories of the current project will be prepended to the list of excludes. Otherwise, the module directories will not be excluded.
  • Type: boolean
  • Since: 0.0.3
  • Required: No
  • User Property: editorconfig.excludeSubmodules
  • Default: true

<excludes>

File patterns to exclude from the set of files to process. The patterns are relative to the current project's baseDir. See also excludeNonSourceFiles and excludeSubmodules.
  • Type: java.util.List<java.lang.String>
  • Since: 0.0.1
  • Required: No
  • User Property: editorconfig.excludes

<excludesFile>

File containing exclude patterns to add to any existing exclude patterns. Empty lines and lines starting with # are ignored.
  • Type: java.io.File
  • Since: 0.1.0
  • Required: No
  • User Property: editorconfig.excludesFile

<failOnNoMatchingProperties>

If true the plugin execution will fail with an error in case no single .editorconfig property matches any file of the current Maven project - this usually means that there is no .editorconfig file in the whole source tree. If false, only a warning is produced in such a situation.
  • Type: boolean
  • Since: 0.0.1
  • Required: No
  • User Property: editorconfig.failOnNoMatchingProperties
  • Default: true

<includes>

File patterns to include into the set of files to process. The patterns are relative to the current project's baseDir.
  • Type: java.util.List<java.lang.String>
  • Since: 0.0.1
  • Required: No
  • User Property: editorconfig.includes
  • Default: **

<linters>

Set the includes and excludes for the individual org.ec4j.lint.api.Linters
  • Type: java.util.List<org.ec4j.maven.LinterConfig>
  • Since: 0.0.1
  • Required: No

<skip>

If true the execution of the Mojo will be skipped; otherwise the Mojo will be executed.
  • Type: boolean
  • Since: 0.0.1
  • Required: No
  • User Property: editorconfig.skip
  • Default: false