Fail the build when naming conventions violated (#3974)
* Failing build if unit test name does not follow one of the following conventions : ..IntegrationTest, ..LongRunningUnitTest, ..ManualTest, ..JdbcTest, ..LiveTest * Custom PMD Rules project * Fixed this issue when unit test classes were not being scanned by custom PMD rule (This happened after I pulled code from upstream project) * Don't fail the build if PMD custom rule fails * Reconfigure PMD * Reformat POM * Adjust PMD rules * Rename test
This commit is contained in:
committed by
GitHub
parent
ecca8c9a89
commit
d337266c7a
10
baeldung-pmd-rules.xml
Normal file
10
baeldung-pmd-rules.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0"?>
|
||||
<ruleset name="Baeldung custom pmd rules" xmlns="http://pmd.sf.net/ruleset/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
|
||||
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
|
||||
<description>Baeldung custom PMD rules</description>
|
||||
<rule name="UnitTestMustFollowNamingConventionRule" message="Test class name doesn't follow the naming convention" class="org.baeldung.pmd.UnitTestNamingConventionRule">
|
||||
<description>Test does not follow Baeldung naming convention</description>
|
||||
<priority>3</priority>
|
||||
</rule>
|
||||
</ruleset>
|
||||
Reference in New Issue
Block a user