com.github.ozsie.GenerateConfigMojo.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of detekt-maven-plugin Show documentation
Show all versions of detekt-maven-plugin Show documentation
A maven plugin wrapper for detekt cli
The newest version!
package com.github.ozsie
import io.gitlab.arturbosch.detekt.cli.parseArguments
import io.gitlab.arturbosch.detekt.cli.runners.ConfigExporter
import org.apache.maven.plugins.annotations.Mojo
@Suppress("unused")
@Mojo(name = "generate-config")
open class GenerateConfigMojo : DetektMojo() {
override fun execute() {
val cliArgs = parseArguments(getCliSting().log().toTypedArray())
log.info("Args: $cliArgs")
ConfigExporter(cliArgs, System.out).run {
if (!skip) return execute()
}
}
}
@Suppress("unused") @Mojo(name = "gc") class GCMojo : GenerateConfigMojo()