restrict-imports-enforcer-rule icon indicating copy to clipboard operation
restrict-imports-enforcer-rule copied to clipboard

Output results in a scriptable format

Open skuzzle opened this issue 5 years ago • 1 comments

Dependency failures might be written in junit xml format to the target folder in order to display such failures in CI environments.

Here is the format apprently used by Jenkins: https://llg.cubic.org/docs/junit/

skuzzle avatar Jul 22 '19 13:07 skuzzle

Draft XML to produce:

<?xml version="1.0" encoding="UTF-8"?>
<testsuite 
    name="de.skuzzle.TestClassName" 
    tests="10"   <!-- max(ban pattern count, failures found) -->
    disabled="0" <!-- Always 0 -->
    errors="0"   <!-- Always 0 -->
    failures="5" <!-- Number of banned imports found in that class. -->
    skipped="0"  <!-- 0, unless skipFlag is true. In that case its the total number of   -->
    timestamp="2014-01-21T16:17:18"
    >
    
    <testcase 
        name="de.skuzzle.packagepattern.**"      <!-- The matched banned pattern -->
        classname="de.skuzzlepackagepattern.Xyz" <!-- The matched class -->
        time="0"                                 <!-- Always 0 -->
        >
        
        <failure 
            message="reason" <!-- The reason phrase of the matched group -->
        ></failure>
    </testcase
</testsuite>

skuzzle avatar Jun 08 '21 05:06 skuzzle