Skip to content

Commit 588c53d

Browse files
committed
Do not count ignored file warnings as linting problems.
1 parent e727ca9 commit 588c53d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/code-style/linter.ts

+13
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,19 @@ export function createLinter(dependencies: {
105105
}
106106
errors = errorCount + warningCount;
107107
fixable = fixableCount;
108+
109+
let ignorePatternCount = (
110+
message.match(
111+
/File ignored because of a matching ignore pattern./g
112+
) || []
113+
).length;
114+
if (ignorePatternCount > 0) {
115+
errors -= ignorePatternCount;
116+
logger.log(
117+
"linter",
118+
`${ignorePatternCount} files ignored because of a matching ignore pattern. These are not counted towards the number of warnings.`
119+
);
120+
}
108121
}
109122
if (response.finished) {
110123
running = false;

0 commit comments

Comments
 (0)