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';
1212import { Configuration , ILinterOptions , Linter , findFormatter } from 'tslint' ;
1313import * as ts from 'typescript' ;
1414
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+
1521
1622function _buildRules ( logger : logging . Logger ) {
1723 const tsConfigPath = path . join ( __dirname , '../rules/tsconfig.json' ) ;
@@ -50,6 +56,10 @@ export default function (options: ParsedArgs, logger: logging.Logger) {
5056 const tsLintConfig = Configuration . loadConfigurationFromPath ( tsLintPath ) ;
5157
5258 program . getRootFileNames ( ) . forEach ( fileName => {
59+ if ( blacklist . some ( x => x . test ( path . relative ( process . cwd ( ) , fileName ) ) ) ) {
60+ return ;
61+ }
62+
5363 linter . lint ( fileName , ts . sys . readFile ( fileName ) || '' , tsLintConfig ) ;
5464 } ) ;
5565
You can’t perform that action at this time.
0 commit comments