Skip to content

Commit ba6b66d

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 e0d0d19 commit ba6b66d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

scripts/lint.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +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 = [
18-
/^dist-schema[\\\/].*/,
19-
];
17+
const excluded = [/^dist-schema[\\\/].*/, /.*\/third_party\/.*/];
2018

2119

2220
function _buildRules(logger: logging.Logger) {
@@ -72,7 +70,8 @@ export default async function (options: ParsedArgs, logger: logging.Logger) {
7270
};
7371

7472
program.getRootFileNames().forEach(fileName => {
75-
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))) {
7675
return;
7776
}
7877

0 commit comments

Comments
 (0)