Added pmd extension with RIFE2 1.5.20

This commit is contained in:
Erik C. Thauvin 2023-04-15 13:34:55 -07:00
parent 60d15e253e
commit 623ecfa7af
6 changed files with 23 additions and 18 deletions

View file

@ -2,11 +2,11 @@
<library name="bld">
<CLASSES>
<root url="file://$PROJECT_DIR$/lib/bld" />
<root url="jar://$USER_HOME$/.rife2/dist/rife2-1.5.19.jar!/" />
<root url="jar://$USER_HOME$/.rife2/dist/rife2-1.5.20.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.rife2/dist/rife2-1.5.19-sources.jar!/" />
<root url="jar://$USER_HOME$/.rife2/dist/rife2-1.5.20-sources.jar!/" />
</SOURCES>
<excluded>
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />

View file

@ -7,7 +7,7 @@
],
"java.configuration.updateBuildConfiguration": "automatic",
"java.project.referencedLibraries": [
"${HOME}/.rife2/dist/rife2-1.5.19.jar",
"${HOME}/.rife2/dist/rife2-1.5.20.jar",
"lib/compile/*.jar",
"lib/runtime/*.jar",
"lib/test/*.jar"

View file

@ -23,8 +23,8 @@
<rule ref="category/java/codestyle.xml">
<exclude name="AtLeastOneConstructor"/>
<exclude name="ClassNamingConventions"/>
<exclude name="CommentDefaultAccessModifier"/>
<exclude name="ConfusingTernary"/>
<exclude name="CommentDefaultAccessModifier"/>
<exclude name="DefaultPackage"/>
<exclude name="FieldNamingConventions"/>
<exclude name="LocalVariableCouldBeFinal"/>
@ -74,7 +74,6 @@
<exclude name="AvoidFieldNameMatchingMethodName"/>
<exclude name="AvoidFieldNameMatchingTypeName"/>
<exclude name="AvoidLiteralsInIfCondition"/>
<exclude name="EmptyCatchBlock"/>
<exclude name="NullAssignment"/>
</rule>
@ -90,13 +89,6 @@
<property name="skipAnnotations" value="true"/>
</properties>
</rule>
<rule ref="category/java/errorprone.xml/EmptyCatchBlock">
<properties>
<property name="allowExceptionNameRegex">
<value>^ignore$</value>
</property>
</properties>
</rule>
<!-- MULTITHREADING -->
<rule ref="category/java/multithreading.xml">

Binary file not shown.

View file

@ -1,6 +1,7 @@
bld.downloadExtensionJavadoc=false
bld.downloadExtensionSources=true
bld.extension-pmd=com.uwyn.rife2:bld-pmd:0.9.1-SNAPSHOT
bld.extension-tests=com.uwyn.rife2:bld-tests-badge:1.1.0
bld.repositories=MAVEN_CENTRAL,RIFE2_RELEASES
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
rife2.downloadLocation=
rife2.version=1.5.19
rife2.version=1.5.20

View file

@ -1,6 +1,8 @@
package rife.render;
import rife.bld.BuildCommand;
import rife.bld.Project;
import rife.bld.extension.PmdOperation;
import rife.bld.extension.TestsBadgeOperation;
import rife.bld.publish.PublishDeveloper;
import rife.bld.publish.PublishInfo;
@ -10,7 +12,8 @@ import rife.bld.publish.PublishScm;
import java.util.List;
import static rife.bld.dependencies.Repository.*;
import static rife.bld.dependencies.Scope.*;
import static rife.bld.dependencies.Scope.compile;
import static rife.bld.dependencies.Scope.test;
import static rife.bld.operations.JavadocOptions.DocLinkOption.NO_MISSING;
public class TemplateRenderersBuild extends Project {
@ -19,7 +22,7 @@ public class TemplateRenderersBuild extends Project {
public TemplateRenderersBuild() {
pkg = "rife.render";
name = "rife2-template-renderers";
version = version(1, 1, 1);
version = version(1, 1, 2, "SNAPSHOT");
javadocOperation().javadocOptions()
.docTitle("<a href=\"https://rife2.com\">RIFE2</a> Template Renderers")
@ -57,7 +60,7 @@ public class TemplateRenderersBuild extends Project {
repositories = List.of(MAVEN_CENTRAL, RIFE2_RELEASES, RIFE2_SNAPSHOTS);
scope(compile)
.include(dependency("com.uwyn.rife2", "rife2", version(1, 5, 19)));
.include(dependency("com.uwyn.rife2", "rife2", version(1, 5, 20)));
scope(test)
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 9, 2)))
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 9, 2)))
@ -68,6 +71,15 @@ public class TemplateRenderersBuild extends Project {
new TemplateRenderersBuild().start(args);
}
@BuildCommand(summary = "Runs PMD analysis")
public void pmd() throws Exception {
new PmdOperation()
.fromProject(this)
.failOnViolation(true)
.ruleSets("config/pmd.xml")
.execute();
}
public void test() throws Exception {
testsBadgeOperation.executeOnce(() -> testsBadgeOperation
.url(property("testsBadgeUrl"))