checkstyles to replicate the FIXME and ASCII character checks.
This commit is contained in:
parent
c19d942b4b
commit
aabb286708
@ -3,6 +3,7 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.github.johnrengelman.shadow"
|
id "com.github.johnrengelman.shadow"
|
||||||
id "java"
|
id "java"
|
||||||
|
id 'checkstyle'
|
||||||
}
|
}
|
||||||
|
|
||||||
Properties props = new Properties()
|
Properties props = new Properties()
|
||||||
|
59
config/checkstyle/checkstyle.xml
Normal file
59
config/checkstyle/checkstyle.xml
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<!DOCTYPE module PUBLIC
|
||||||
|
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
|
||||||
|
"https://checkstyle.org/dtds/configuration_1_3.dtd">
|
||||||
|
|
||||||
|
<module name="Checker">
|
||||||
|
<module name="SuppressWarningsFilter"/>
|
||||||
|
|
||||||
|
<property name="charset" value="UTF-8"/>
|
||||||
|
|
||||||
|
<property name="severity" value="warning"/>
|
||||||
|
|
||||||
|
<property name="fileExtensions" value="java"/>
|
||||||
|
<!-- Excludes all 'module-info.java' files -->
|
||||||
|
<!-- See https://checkstyle.org/config_filefilters.html -->
|
||||||
|
<module name="BeforeExecutionExclusionFileFilter">
|
||||||
|
<property name="fileNamePattern" value="module\-info\.java$"/>
|
||||||
|
</module>
|
||||||
|
<!-- https://checkstyle.org/config_filters.html#SuppressionFilter -->
|
||||||
|
<module name="SuppressionFilter">
|
||||||
|
<property name="file" value="${org.checkstyle.google.suppressionfilter.config}"
|
||||||
|
default="checkstyle-suppressions.xml" />
|
||||||
|
<property name="optional" value="true"/>
|
||||||
|
</module>
|
||||||
|
|
||||||
|
<!-- Checks for whitespace -->
|
||||||
|
<!-- See http://checkstyle.org/config_whitespace.html -->
|
||||||
|
<!-- <module name="FileTabCharacter">-->
|
||||||
|
<!-- <property name="eachLine" value="true"/>-->
|
||||||
|
<!-- </module>-->
|
||||||
|
|
||||||
|
<!-- <module name="LineLength">-->
|
||||||
|
<!-- <property name="fileExtensions" value="java"/>-->
|
||||||
|
<!-- <property name="max" value="100"/>-->
|
||||||
|
<!-- <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>-->
|
||||||
|
<!-- </module>-->
|
||||||
|
|
||||||
|
<module name="TreeWalker">
|
||||||
|
<module name="Regexp">
|
||||||
|
<property name="format" value="(FIXME|TODO:.*CRITICAL)"/>
|
||||||
|
<!-- <property name="illegalPattern" value="true"/>-->
|
||||||
|
<property name="message"
|
||||||
|
value="CRITICAL TODOs exist in project."/>
|
||||||
|
</module>
|
||||||
|
<module name="Regexp">
|
||||||
|
<property name="format" value="\P{ASCII}"/>
|
||||||
|
<!-- <property name="illegalPattern" value="true"/>-->
|
||||||
|
<property name="message"
|
||||||
|
value="Non-ASCII characters exist in project."/>
|
||||||
|
</module>
|
||||||
|
<module name="IllegalTokenText">
|
||||||
|
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
|
||||||
|
<property name="format"
|
||||||
|
value="\\u00(09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
|
||||||
|
<property name="message"
|
||||||
|
value="Consider using special escape sequence instead of octal value or Unicode escaped value."/>
|
||||||
|
</module>
|
||||||
|
</module>
|
||||||
|
</module>
|
@ -2,6 +2,7 @@ plugins {
|
|||||||
id "com.github.johnrengelman.shadow"
|
id "com.github.johnrengelman.shadow"
|
||||||
id 'java'
|
id 'java'
|
||||||
id 'com.adarshr.test-logger' version '3.2.0'
|
id 'com.adarshr.test-logger' version '3.2.0'
|
||||||
|
id 'checkstyle'
|
||||||
}
|
}
|
||||||
|
|
||||||
group 'net.sf.openrocket'
|
group 'net.sf.openrocket'
|
||||||
@ -18,11 +19,10 @@ repositories {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
//test {
|
checkstyle {
|
||||||
// testLogging {
|
ignoreFailures = false
|
||||||
// events "PASSED", "SKIPPED", "FAILED"
|
maxWarnings = 0
|
||||||
// }
|
}
|
||||||
//}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation group: 'org.commonmark', name: 'commonmark', version: '0.19.0' // 0.21.0
|
implementation group: 'org.commonmark', name: 'commonmark', version: '0.19.0' // 0.21.0
|
||||||
|
@ -2,6 +2,7 @@ plugins {
|
|||||||
id "com.github.johnrengelman.shadow"
|
id "com.github.johnrengelman.shadow"
|
||||||
id 'java'
|
id 'java'
|
||||||
id 'com.adarshr.test-logger' version '3.2.0'
|
id 'com.adarshr.test-logger' version '3.2.0'
|
||||||
|
id 'checkstyle'
|
||||||
}
|
}
|
||||||
|
|
||||||
group 'net.sf.openrocket'
|
group 'net.sf.openrocket'
|
||||||
@ -18,11 +19,10 @@ repositories {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
//test {
|
checkstyle {
|
||||||
// testLogging {
|
ignoreFailures = false
|
||||||
// events "PASSED", "SKIPPED", "FAILED"
|
maxWarnings = 0
|
||||||
// }
|
}
|
||||||
//}
|
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
testArtifactsClasspath {
|
testArtifactsClasspath {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user