Skip to content

Commit 2ecdddc

Browse files
alan-agius4alexeagle
authored andcommitted
build: fixes exclude list of file on windows
At the moment, the exclude list doesn't work on windows due to path normalization
1 parent f718968 commit 2ecdddc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/lint.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import * as path from 'path';
1212
import { Configuration, ILinterOptions, Linter, findFormatter } from 'tslint';
1313
import * as ts from 'typescript';
1414

15-
// Blacklist (regexes) of the files to not lint. Generated files should not be linted.
15+
// Excluded (regexes) of the files to not lint. Generated files should not be linted.
1616
// TODO: when moved to using bazel for the build system, this won't be needed.
17-
const blacklist = [/^dist-schema[\\\/].*/, /.*\/third_party\/.*/];
17+
const excluded = [/^dist-schema[\\\/].*/, /.*\/third_party\/.*/];
1818

1919

2020
function _buildRules(logger: logging.Logger) {
@@ -70,7 +70,8 @@ export default async function (options: ParsedArgs, logger: logging.Logger) {
7070
};
7171

7272
program.getRootFileNames().forEach(fileName => {
73-
if (blacklist.some(x => x.test(path.relative(process.cwd(), fileName)))) {
73+
const filePath = path.relative(process.cwd(), fileName).replace(/\\/g, '/');
74+
if (excluded.some(x => x.test(filePath))) {
7475
return;
7576
}
7677

0 commit comments

Comments
 (0)