org.thewonderlemming.c4plantuml.mojo.linting

## Class LintingMojo

- java.lang.Object
- - org.apache.maven.plugin.AbstractMojo
  - - org.thewonderlemming.c4plantuml.mojo.AbstractParentMojo
    - - org.thewonderlemming.c4plantuml.mojo.linting.LintingMojo

- All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

      @Mojo(name="lint",
            defaultPhase=PROCESS_CLASSES)
      public class LintingMojo
      extends AbstractParentMojo

  A MOJO that parses the C4 PlantUML files that are contained in the output directory and applies a set of linting rules to find violations. Breaks the build on violations if said so.
  Author:
    thewonderlemming

- - ### Field Summary

    - ### Fields inherited from class org.thewonderlemming.c4plantuml.mojo.AbstractParentMojo

      `DEFAULT_SOURCE_FILE_EXTENSION`

    - ### Fields inherited from interface org.apache.maven.plugin.Mojo

      `ROLE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LintingMojo()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `doExecute()` Parses the C4 PlantUML files to find linting violations, and breaks the build if the `failOnLintErrors` is set to `true`.

    - ### Methods inherited from class org.thewonderlemming.c4plantuml.mojo.AbstractParentMojo

      `execute, getCurrentCharset, getOutputDirectory, getProject, getSourceFileExtension, processOutputDirectoryFiles, validateSourceFileExtension`

    - ### Methods inherited from class org.apache.maven.plugin.AbstractMojo

      `getLog, getPluginContext, setLog, setPluginContext`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LintingMojo

          public LintingMojo()

  - ### Method Detail

    - #### doExecute

          protected void doExecute()
                            throws org.apache.maven.plugin.MojoExecutionException,
                                   org.apache.maven.plugin.MojoFailureException

      Parses the C4 PlantUML files to find linting violations, and breaks the build if the `failOnLintErrors` is set to `true`.

      An abstract method to hold the children classes execution logic.

      Specified by:
        `doExecute` in class `AbstractParentMojo`
      Throws:
        `org.apache.maven.plugin.MojoExecutionException` - if there is an issue with the build that makes it impossible to continue.
        `org.apache.maven.plugin.MojoFailureException` - if there is any other kind of failures.

Copyright © 2020. All rights reserved.