Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Only the last --exclude is honoured in 5.4.1 #2855

Closed
sandersn opened this issue Jun 1, 2017 · 4 comments · Fixed by #2858
Closed

Only the last --exclude is honoured in 5.4.1 #2855

sandersn opened this issue Jun 1, 2017 · 4 comments · Fixed by #2858

Comments

@sandersn
Copy link
Contributor

sandersn commented Jun 1, 2017

Bug Report

#2853 doesn't fix the --exclude issue for

  • TSLint version: 5.4.1
  • TypeScript version: master
  • Running TSLint via: CLI

TypeScript code being linted

Typescript. Here's how to repro:

$ git clone https://github.com/Microsoft/TypeScript.git lint-failure
$ cd lint-failure
$ npm install
$ gulp lint

Which runs the command line: node node_modules/tslint/bin/tslint Gulpfile.ts 'scripts/tslint/*.ts' 'src/**/*.ts' --exclude src/lib/es5.d.ts --exclude 'src/lib/*.generated.d.ts' --format stylish

Removing the second --exclude src/lib/*.generated.d.ts correctly excludes src/lib/es5.d.ts, but not any of the generated d.ts files. So I think the error is that multiple excludes are ignored.

Actual behavior

Thousands of errors from src/lib/es5.d.ts because it is not excluded.

Expected behavior

No errors from src/lib/es5.d.ts

@sandersn sandersn changed the title --exclude still doesn't work in 5.4.1 Only the last --exclude is honoured in 5.4.1 Jun 1, 2017
@adidahiya
Copy link
Contributor

looking into this now

@sandersn
Copy link
Contributor Author

sandersn commented Jun 1, 2017

Note that it seems to work on node 8. Maybe this is a change in command line parsing libraries of node?

@adidahiya
Copy link
Contributor

adidahiya commented Jun 1, 2017

We did switch from optimist to commander in 5.4, that's probably also related... #2689

@sandersn
Copy link
Contributor Author

sandersn commented Jun 1, 2017

I just upgraded to node 8 and still repro the issue locally. So our build system may not even be running tslint correctly on node 8.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants