Skip to content

andreysaksonov/detekt-maven-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status codecov FOSSA Status Maven Central

Detekt Maven Plugin

A maven plugin that wraps the Detekt CLI. It supports the same parameters as the Detekt CLI.

How to use

Basic configuration

<build>
    <plugins>
        <plugin>
            <groupId>com.github.ozsie</groupId>
            <artifactId>detekt-maven-plugin</artifactId>
            <version>1.0.0-RC14</version>
            <executions>
                <execution>
                    <phase>verify</phase>
                    <goals><goal>check</goal></goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

Using the above configuration, Detekt will scan source files in ${basedir}/src and output the results in ${basedir}/detekt.

All parameters available to Detekt version 1.0.0-RC14 can be configured in the plugin.

Goals

check

Used to run detekt. All cli parameters, excluding -gc and -cb, are available using -Ddetekt.{parameter}

Examples

  • mvn detekt:check -Ddetekt.config=detekt.yml
  • mvn detekt:check -Ddetekt.debug=true

create-baseline

Used to create a baseline. All cli parameters, excluding -gc and -cb, are available using -Ddetekt.{parameter}

Examples

  • mvn detekt:cb -Ddetekt.config=detekt.yml
  • mvn detekt:cb -Ddetekt.debug=true
  • mvn detekt:create-baseline -Ddetekt.config=detekt.yml
  • mvn detekt:create-baseline -Ddetekt.debug=true

generate-config

Used to generate a default configuration file

Example

  • mvn detekt:gc
  • mvn detekt:generate-config

For more information on Detekt, have a look at https://github.com/arturbosch/detekt

License

FOSSA Status

About

Maven wrapper for detekt cli

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 100.0%