Skip to content

Commit

Permalink
check if paths patterns are note empty
Browse files Browse the repository at this point in the history
  • Loading branch information
szym1991 authored and reda-alaoui committed Aug 29, 2023
1 parent 1e1eabd commit db75526
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ public Iterable<Issue> filter() {
}

String includedPathsGlobPattern = filterConfig.getIncludedPathsGlobPattern();
if (includedPathsGlobPattern != null) {
if (includedPathsGlobPattern != null && !includedPathsGlobPattern.isEmpty()) {

Check warning on line 50 in src/main/java/org/jenkinsci/plugins/sonargerrit/sonar/IssueFilter.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Partially covered line

Line 50 is only partially covered, 3 branches are missing
toBeApplied.add(new ByGlobPatternPredicate(includedPathsGlobPattern));
}

String excludedPathsGlobPattern = filterConfig.getExcludedPathsGlobPattern();
if (excludedPathsGlobPattern != null) {
if (excludedPathsGlobPattern != null && !excludedPathsGlobPattern.isEmpty()) {

Check warning on line 55 in src/main/java/org/jenkinsci/plugins/sonargerrit/sonar/IssueFilter.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Partially covered line

Line 55 is only partially covered, 3 branches are missing
toBeApplied.add(new ByGlobPatternPredicate(excludedPathsGlobPattern).negate());
}

Expand Down

0 comments on commit db75526

Please sign in to comment.