Skip to content

Commit 4aff01a

Browse files
committed
fix(globs): check all globs before returning false
1 parent f47249e commit 4aff01a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## [Unreleased]
44

5+
### Fixed
6+
- Files are excluded from linting because globs check does not check all globs.
7+
58
## [1.13.1] - 2023-06-05
69

710
### Fixed

src/main/kotlin/com/github/blarc/gitlab/template/lint/plugin/GitlabLintUtils.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ object GitlabLintUtils {
4242
for (globString in globs) {
4343
val glob = fileSystem.getPathMatcher("glob:$globString")
4444
try {
45-
return glob.matches(fileSystem.getPath(text))
45+
if (glob.matches(fileSystem.getPath(text))) {
46+
return true
47+
}
4648
}
4749
catch (e: InvalidPathException) {
48-
return false
50+
// Ignore invalid paths
4951
}
5052
}
5153
return false

0 commit comments

Comments
 (0)