File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,12 @@ import * as path from 'path';
12
12
import { Configuration , ILinterOptions , Linter , findFormatter } from 'tslint' ;
13
13
import * as ts from 'typescript' ;
14
14
15
+ // Blacklist (regexes) of the files to not lint. Generated files should not be linted.
16
+ // TODO: when moved to using bazel for the build system, this won't be needed.
17
+ const blacklist = [
18
+ / ^ d i s t - s c h e m a [ \\ \/ ] .* / ,
19
+ ] ;
20
+
15
21
16
22
function _buildRules ( logger : logging . Logger ) {
17
23
const tsConfigPath = path . join ( __dirname , '../rules/tsconfig.json' ) ;
@@ -50,6 +56,10 @@ export default function (options: ParsedArgs, logger: logging.Logger) {
50
56
const tsLintConfig = Configuration . loadConfigurationFromPath ( tsLintPath ) ;
51
57
52
58
program . getRootFileNames ( ) . forEach ( fileName => {
59
+ if ( blacklist . some ( x => x . test ( path . relative ( process . cwd ( ) , fileName ) ) ) ) {
60
+ return ;
61
+ }
62
+
53
63
linter . lint ( fileName , ts . sys . readFile ( fileName ) || '' , tsLintConfig ) ;
54
64
} ) ;
55
65
You can’t perform that action at this time.
0 commit comments