Skip to content

Commit 5ca0566

Browse files
committed
fix pom and ci
1 parent 1fa8821 commit 5ca0566

File tree

2 files changed

+39
-16
lines changed

2 files changed

+39
-16
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,33 @@ jobs:
7070

7171
- name: Print filtered coverage percentage
7272
run: |
73-
COVERED_LINES=$(xmllint --xpath "sum(//report/package[not(contains(@name, 'results')) and not(contains(@name, 'kicsRealtimeResults')) and not(contains(@name, 'asca')) and not(contains(@name, 'learnMore')) and not(contains(@name, 'predicate')) and not(contains(@name, 'scan')) and not(contains(@name, 'codebashing')) and not(contains(@name, 'remediation')) and not(contains(@name, 'project')) and not(contains(@name, 'tenant'))]/counter[@type='LINE']/@covered)" target/site/jacoco/jacoco.xml)
74-
75-
MISSED_LINES=$(xmllint --xpath "sum(//report/package[not(contains(@name, 'results')) and not(contains(@name, 'kicsRealtimeResults')) and not(contains(@name, 'asca')) and not(contains(@name, 'learnMore')) and not(contains(@name, 'predicate')) and not(contains(@name, 'scan')) and not(contains(@name, 'codebashing')) and not(contains(@name, 'remediation')) and not(contains(@name, 'project')) and not(contains(@name, 'tenant'))]/counter[@type='LINE']/@missed)" target/site/jacoco/jacoco.xml)
73+
COVERED_LINES=$(xmllint --xpath "sum(//report/package[
74+
not(starts-with(@name, 'com.checkmarx.ast.results')) and
75+
not(starts-with(@name, 'com.checkmarx.ast.kicsRealtimeResults')) and
76+
not(starts-with(@name, 'com.checkmarx.ast.asca')) and
77+
not(starts-with(@name, 'com.checkmarx.ast.learnMore')) and
78+
not(starts-with(@name, 'com.checkmarx.ast.predicate')) and
79+
not(starts-with(@name, 'com.checkmarx.ast.scan')) and
80+
not(starts-with(@name, 'com.checkmarx.ast.codebashing')) and
81+
not(starts-with(@name, 'com.checkmarx.ast.remediation')) and
82+
not(starts-with(@name, 'com.checkmarx.ast.project')) and
83+
not(starts-with(@name, 'com.checkmarx.ast.tenant')) and
84+
not(starts-with(@name, 'com.checkmarx.ast.wrapper.Execution'))
85+
]/counter[@type='LINE']/@covered)" target/site/jacoco/jacoco.xml)
86+
87+
MISSED_LINES=$(xmllint --xpath "sum(//report/package[
88+
not(starts-with(@name, 'com.checkmarx.ast.results')) and
89+
not(starts-with(@name, 'com.checkmarx.ast.kicsRealtimeResults')) and
90+
not(starts-with(@name, 'com.checkmarx.ast.asca')) and
91+
not(starts-with(@name, 'com.checkmarx.ast.learnMore')) and
92+
not(starts-with(@name, 'com.checkmarx.ast.predicate')) and
93+
not(starts-with(@name, 'com.checkmarx.ast.scan')) and
94+
not(starts-with(@name, 'com.checkmarx.ast.codebashing')) and
95+
not(starts-with(@name, 'com.checkmarx.ast.remediation')) and
96+
not(starts-with(@name, 'com.checkmarx.ast.project')) and
97+
not(starts-with(@name, 'com.checkmarx.ast.tenant')) and
98+
not(starts-with(@name, 'com.checkmarx.ast.wrapper.Execution'))
99+
]/counter[@type='LINE']/@missed)" target/site/jacoco/jacoco.xml)
76100
77101
if [ -z "$COVERED_LINES" ] || [ -z "$MISSED_LINES" ]; then
78102
echo "Error: Could not extract coverage data from jacoco.xml"
@@ -90,6 +114,7 @@ jobs:
90114
echo "Filtered coverage percentage: $COVERAGE_PERCENTAGE%"
91115
92116

117+
93118

94119
- name: Generate JaCoCo Badge
95120
uses: cicirello/jacoco-badge-generator@f33476a5a3fd5a4f77cb5eef2ebe728c1dd5b921 #v2.11.0

pom.xml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,19 +80,17 @@
8080
</goals>
8181
<configuration>
8282
<excludes>
83-
<exclude>com/checkmarx/ast/results/**</exclude>
84-
<exclude>com/checkmarx/ast/results/result/**</exclude>
85-
<exclude>com/checkmarx/ast/kicsRealtimeResults/**</exclude>
86-
<exclude>com/checkmarx/ast/kicsRealtimeResults/ast/kicsRealtimeResult/**</exclude>
87-
<exclude>com/checkmarx/ast/asca/**</exclude>
88-
<exclude>com/checkmarx/ast/learnMore/**</exclude>
89-
<exclude>com/checkmarx/ast/predicate/**</exclude>
90-
<exclude>com/checkmarx/ast/scan/**</exclude>
91-
<exclude>com/checkmarx/ast/codebashing/**</exclude>
92-
<exclude>com/checkmarx/ast/remediation/**</exclude>
93-
<exclude>com/checkmarx/ast/project/**</exclude>
94-
<exclude>com/checkmarx/ast/tenant/**</exclude>
95-
<exclude>com/checkmarx/ast/wrapper/Execution**</exclude>
83+
<exclude>**/com/checkmarx/ast/results/**</exclude>
84+
<exclude>**/com/checkmarx/ast/kicsRealtimeResults/**</exclude>
85+
<exclude>**/com/checkmarx/ast/asca/**</exclude>
86+
<exclude>**/com/checkmarx/ast/learnMore/**</exclude>
87+
<exclude>**/com/checkmarx/ast/predicate/**</exclude>
88+
<exclude>**/com/checkmarx/ast/scan/**</exclude>
89+
<exclude>**/com/checkmarx/ast/codebashing/**</exclude>
90+
<exclude>**/com/checkmarx/ast/remediation/**</exclude>
91+
<exclude>**/com/checkmarx/ast/project/**</exclude>
92+
<exclude>**/com/checkmarx/ast/tenant/**</exclude>
93+
<exclude>**/com/checkmarx/ast/wrapper/Execution**</exclude>
9694
</excludes>
9795

9896

0 commit comments

Comments
 (0)