com.github.ozsie.CreateBaselineMojo.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
package com.github.ozsie
import io.gitlab.arturbosch.detekt.cli.CliArgs
import io.gitlab.arturbosch.detekt.cli.parseArguments
import io.gitlab.arturbosch.detekt.cli.runners.Runner
import org.apache.maven.plugins.annotations.Mojo
@Suppress("unused")
@Mojo(name = "create-baseline")
open class CreateBaselineMojo : DetektMojo() {
override fun execute() {
getCliSting().forEach {
log.debug("Applying $it")
}
val cliArgs = parseArguments(cliString).first
if (!skip) Runner(cliArgs).execute()
}
private val cliString get() = getCliSting().apply { add(CREATE_BASELINE) }.log().toTypedArray()
}
@Suppress("unused") @Mojo(name = "cb") class CBMojo : CreateBaselineMojo()
© 2015 - 2025 Weber Informatics LLC | Privacy Policy