Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Certain Codelyzer Rules hang linting on angular-cli project after upgrading codelyzer 1.0->2.0 and tslint 3.x->4.x #181

Closed
JohannesRudolph opened this issue Dec 7, 2016 · 5 comments
Assignees
Labels

Comments

@JohannesRudolph
Copy link

See discussion in angular/angular-cli#3404

I could pinpoint it down to these rules, each of which makes linting take forever:

     "no-input-rename": true,
    "no-output-rename": true,
    "component-class-suffix": true,
    "directive-class-suffix": true,
    "no-access-missing-member": true,
    "templates-use-public": true,

Anyway I can debug into codelyzer live on my project? It's a proprietary codebase, so it's difficult to produce a repro.

@mgechev
Copy link
Owner

mgechev commented Dec 7, 2016

The best you can do is to run:

tslint -c tslint.config path/to/file.ts

See which file causes codelyzer to hang and share its content. This way I will be able to debug it and push a fix as soon as possible.

@mgechev
Copy link
Owner

mgechev commented Dec 7, 2016

PS: in order to find the file easier you can first locate the directory into which it is located:

tslint -c tslint.json dir1/**/*.ts
tslint -c tslint.json dir2/**/*.ts
...

@psurrey
Copy link

psurrey commented Dec 9, 2016

I've had the same issue and took the time to go through the files in order to figure out what caused tslint to hang.
Result: We use stylus for our css styles and in one of the *.styl files there was the following line:

position: relative // relative for .tableConfigs position: absolute"
changing it to (removing the " at the end of the line fixes it):
position: relative // relative for .tableConfigs position: absolute

Does codelyzer analyze the styl files as well?

@mgechev
Copy link
Owner

mgechev commented Dec 9, 2016

Yeah, it can analyze stylus files as well but by default it doesn't. Take a look at the advanced configuration. Currently it thinks of the stylus files as CSS and thins seems to break something.

@mgechev mgechev self-assigned this Dec 10, 2016
@mgechev mgechev added this to the 2.0.0-Beta 2 - Turing switch milestone Dec 10, 2016
@mgechev
Copy link
Owner

mgechev commented Dec 10, 2016

This seems the issue #186 and should be already fixed. I'll push the new version tonight.

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

No branches or pull requests

3 participants