Added detekt extension
This commit is contained in:
parent
21fffc19a2
commit
bddd116090
4 changed files with 49 additions and 1 deletions
|
@ -18,6 +18,14 @@
|
||||||
<ID>MagicNumber:JokeUtil.kt$500</ID>
|
<ID>MagicNumber:JokeUtil.kt$500</ID>
|
||||||
<ID>MagicNumber:JokeUtil.kt$523</ID>
|
<ID>MagicNumber:JokeUtil.kt$523</ID>
|
||||||
<ID>TooManyFunctions:JokeConfig.kt$JokeConfig$Builder</ID>
|
<ID>TooManyFunctions:JokeConfig.kt$JokeConfig$Builder</ID>
|
||||||
|
<ID>WildcardImport:ExceptionsTest.kt$import assertk.assertions.*</ID>
|
||||||
|
<ID>WildcardImport:GetJokeTest.kt$import assertk.assertions.*</ID>
|
||||||
|
<ID>WildcardImport:GetJokeTest.kt$import net.thauvin.erik.jokeapi.models.*</ID>
|
||||||
|
<ID>WildcardImport:GetJokesTest.kt$import assertk.assertions.*</ID>
|
||||||
<ID>WildcardImport:JokeApi.kt$import net.thauvin.erik.jokeapi.models.*</ID>
|
<ID>WildcardImport:JokeApi.kt$import net.thauvin.erik.jokeapi.models.*</ID>
|
||||||
|
<ID>WildcardImport:JokeConfig.kt$import net.thauvin.erik.jokeapi.models.*</ID>
|
||||||
|
<ID>WildcardImport:JokeConfigTest.kt$import assertk.assertions.*</ID>
|
||||||
|
<ID>WildcardImport:JokeConfigTest.kt$import net.thauvin.erik.jokeapi.models.*</ID>
|
||||||
|
<ID>WildcardImport:JokeUtil.kt$import net.thauvin.erik.jokeapi.models.*</ID>
|
||||||
</CurrentIssues>
|
</CurrentIssues>
|
||||||
</SmellBaseline>
|
</SmellBaseline>
|
||||||
|
|
|
@ -2,6 +2,7 @@ bld.downloadExtensionJavadoc=false
|
||||||
bld.downloadExtensionSources=true
|
bld.downloadExtensionSources=true
|
||||||
bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.1
|
bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.1
|
||||||
bld.extensions=com.uwyn.rife2:bld-kotlin:0.9.0-SNAPSHOT
|
bld.extensions=com.uwyn.rife2:bld-kotlin:0.9.0-SNAPSHOT
|
||||||
|
bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.0-SNAPSHOT
|
||||||
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
||||||
bld.downloadLocation=
|
bld.downloadLocation=
|
||||||
bld.sourceDirectories=
|
bld.sourceDirectories=
|
||||||
|
|
18
pom.xml
18
pom.xml
|
@ -21,6 +21,24 @@
|
||||||
<version>1.9.21</version>
|
<version>1.9.21</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
|
<artifactId>kotlin-stdlib-common</artifactId>
|
||||||
|
<version>1.9.21</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
|
<artifactId>kotlin-stdlib-jdk7</artifactId>
|
||||||
|
<version>1.9.21</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
|
<artifactId>kotlin-stdlib-jdk8</artifactId>
|
||||||
|
<version>1.9.21</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.json</groupId>
|
<groupId>org.json</groupId>
|
||||||
<artifactId>json</artifactId>
|
<artifactId>json</artifactId>
|
||||||
|
|
|
@ -34,6 +34,7 @@ package net.thauvin.erik;
|
||||||
import rife.bld.BuildCommand;
|
import rife.bld.BuildCommand;
|
||||||
import rife.bld.Project;
|
import rife.bld.Project;
|
||||||
import rife.bld.extension.CompileKotlinOperation;
|
import rife.bld.extension.CompileKotlinOperation;
|
||||||
|
import rife.bld.extension.DetektOperation;
|
||||||
import rife.bld.extension.JacocoReportOperation;
|
import rife.bld.extension.JacocoReportOperation;
|
||||||
import rife.bld.extension.dokka.DokkaOperation;
|
import rife.bld.extension.dokka.DokkaOperation;
|
||||||
import rife.bld.extension.dokka.LoggingLevel;
|
import rife.bld.extension.dokka.LoggingLevel;
|
||||||
|
@ -64,8 +65,12 @@ public class JokeApiBuild extends Project {
|
||||||
autoDownloadPurge = true;
|
autoDownloadPurge = true;
|
||||||
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL);
|
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL);
|
||||||
|
|
||||||
|
final var kotlin = version(1, 9, 21);
|
||||||
scope(compile)
|
scope(compile)
|
||||||
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", version(1, 9, 21)))
|
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin))
|
||||||
|
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib-common", kotlin))
|
||||||
|
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib-jdk7", kotlin))
|
||||||
|
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib-jdk8", kotlin))
|
||||||
.include(dependency("org.json", "json", "20231013"))
|
.include(dependency("org.json", "json", "20231013"))
|
||||||
.include(dependency("net.thauvin.erik.urlencoder", "urlencoder-lib-jvm", version(1, 4, 0)));
|
.include(dependency("net.thauvin.erik.urlencoder", "urlencoder-lib-jvm", version(1, 4, 0)));
|
||||||
scope(test)
|
scope(test)
|
||||||
|
@ -120,6 +125,22 @@ public class JokeApiBuild extends Project {
|
||||||
.execute();
|
.execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@BuildCommand(summary = "Checks source with Detekt")
|
||||||
|
public void detekt() throws ExitStatusException, IOException, InterruptedException {
|
||||||
|
new DetektOperation()
|
||||||
|
.fromProject(this)
|
||||||
|
.execute();
|
||||||
|
}
|
||||||
|
|
||||||
|
@BuildCommand(value = "detekt-baseline", summary = "Creates the Detekt baseline")
|
||||||
|
public void detektBaseline() throws ExitStatusException, IOException, InterruptedException {
|
||||||
|
new DetektOperation()
|
||||||
|
.fromProject(this)
|
||||||
|
.baseline("detekt-baseline.xml")
|
||||||
|
.createBaseline(true)
|
||||||
|
.execute();
|
||||||
|
}
|
||||||
|
|
||||||
@BuildCommand(summary = "Generates JaCoCo Reports")
|
@BuildCommand(summary = "Generates JaCoCo Reports")
|
||||||
public void jacoco() throws IOException {
|
public void jacoco() throws IOException {
|
||||||
new JacocoReportOperation()
|
new JacocoReportOperation()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue