Skip to content

Commit 36c231c

Browse files
committed
allow wildcards in paths for config files
1 parent da2c6e6 commit 36c231c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/issues/datasetIssues.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { default as ignore } from '@ignore'
2+
import type { Ignore } from '@ignore'
13
import { nonSchemaIssues } from './list.ts'
24
import type { Issue, IssueDefinition, IssueFile, Severity } from '../types/issues.ts'
35
export type { Issue, IssueDefinition, IssueFile, Severity }
@@ -41,7 +43,13 @@ export class DatasetIssues {
4143
if (!value) {
4244
continue
4345
}
44-
found = found.filter((x) => x[key as keyof Issue] === value)
46+
if (key === 'location'){
47+
// @ts-expect-error
48+
const key_ignore = ignore().add(value as string)
49+
found = found.filter((x) => x[key] && key_ignore.ignores(x[key].slice(1, x[key].length)))
50+
} else {
51+
found = found.filter((x) => x[key as keyof Issue] === value)
52+
}
4553
}
4654
return found
4755
}

0 commit comments

Comments
 (0)