## lint

##### Full name:

org.thewonderlemming.c4plantuml:c4plantuml-maven-plugin:1.0.0:lint

##### Description:

Analyzes the C4 source files found in the output directory to verify that they comply to every active linting rules that are contained in the classpath. Any violation will be written to the standard output. It can fail the fail if configured to do so.

You can write and add your own linting rules. You can find a list of the existing rules on the built-in linting rules page.

You can find detailed examples on the dedicated examples page.

##### Attributes:

- Requires a Maven project to be executed.
- Binds to a default lifecycle phase: `process-classes`.
- Uses the `project.build.sourceEncoding` property to set the C4 source files encoding.

### Optional parameters

Name | Type | Since | Description
--- | --- | --- | ---
<customRules> | `Properties` | `1.0.0` | Properties that is available to any custom linting rule.
<failOnLintErrors> | `boolean` | `1.0.0` | A flag that enables the goal to break the build on any linting violation if set to true. Default value is: `true`
<rules> | `BuiltInRules` | `1.0.0` | A configuration object that is used to configure built-in linting rules.
<sourceFileExtension> | `String` | `1.0.0` | Extension for the C4 source files. Default value is: `.puml` Case insensitive: `Yes`

### Parameter details

#### <customRules>

Properties that is available to any custom linting rule. When adding custom rules, you can use that property to pass any rule parameter.

The following snippet adds such parameters that would be used by an hypothetical custom rule:

    <build>
        <plugins>
            <plugin>
                <groupId>org.thewonderlemming.c4plantuml</groupId>
                <artifactId>c4plantuml-maven-plugin</artifactId>
                <version>1.0.0-RC1</version>
                <executions>
                    <execution>
                        <id>linting-c4-files</id>
                        <goals>
                            <goal>lint</goal>
                        </goals>
                        <configuration>
                            <customRules>
                                <property>
                                    <name>myCustomRule.isEnabled</name>
                                    <value>false</value>
                                </property>
                                <property>
                                    <name>myOtherCustomRule.threshold</name>
                                    <value>42</value>
                                </property>
                            </customRules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

- Type: `java.util.Properties`
- Since: `1.0.0`
- Required: `No`

#### <failOnLintErrors>

A flag that enables the goal to break the build on any linting violation if set to true.

The following snippet changes the value of the `<failOnLintErrors>` to `false`.

    <build>
        <plugins>
            <plugin>
                <groupId>org.thewonderlemming.c4plantuml</groupId>
                <artifactId>c4plantuml-maven-plugin</artifactId>
                <version>1.0.0-RC1</version>
                <executions>
                    <execution>
                        <id>linting-c4-files</id>
                        <goals>
                            <goal>lint</goal>
                        </goals>
                        <configuration>
                            <failOnLintErrors>false</failOnLintErrors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

- Type: `boolean`
- Default value is: `true`

#### <rules>

A configuration object that is used to configure built-in linting rules.

The following snippet disables every built-in rule (which will cause the goal to fail):

    <build>
        <plugins>
            <plugin>
                <groupId>org.thewonderlemming.c4plantuml</groupId>
                <artifactId>c4plantuml-maven-plugin</artifactId>
                <version>1.0.0-RC1</version>
                <executions>
                    <execution>
                        <id>linting-c4-files</id>
                        <goals>
                            <goal>lint</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <aliasesShouldBeListedInDictionary>
                                    <isActivated>false</isActivated>
                                </aliasesShouldBeListedInDictionary>
                                <aliasesShouldFollowStandardConvention>
                                    <isActivated>false</isActivated>
                                </aliasesShouldFollowStandardConvention>
                                <aliasesShouldBeUnique>
                                    <isActivated>false</isActivated>
                                </aliasesShouldBeUnique>
                                <noOrphanAliasInRelationships>
                                    <isActivated>false</isActivated>
                                </noOrphanAliasInRelationships>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

You can find more about built-in rules configuration over there.

- Type: `org.thewonderlemming.c4plantuml.mojo.linting.BuiltInRules`
- Since: `1.0.0`
- Required: `No`

#### <sourceFileExtension>

Extension for the C4 source files.

The following snippet changes the value of the `<sourceFileExtension>` to `.c4`.

    <build>
        <plugins>
            <plugin>
                <groupId>org.thewonderlemming.c4plantuml</groupId>
                <artifactId>c4plantuml-maven-plugin</artifactId>
                <version>1.0.0-RC1</version>
                <executions>
                    <execution>
                        <id>linting-c4-files</id>
                        <goals>
                            <goal>lint</goal>
                        </goals>
                        <configuration>
                            <sourceFileExtension>.c4</sourceFileExtension>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

- Type: `java.lang.String`
- Since: `1.0.0`
- Required: `No`
- Default: `.puml`
- Case insensitive: `Yes`