bcherny / tslint-no-circular-imports

TSLint plugin to detect and warn about circular imports
MIT License
86 stars 12 forks source link

Added a search-depth-limit parameter to limit cycle detection depth #20

Closed JoshuaKGoldberg closed 6 years ago

JoshuaKGoldberg commented 6 years ago

Limits the depth of cycle reporting to a fixed to a fixied size limit for a list of files. This helps improve performance, as most cycles do not surpass a few related files.

As I mentioned in the issue, we could theoretically fix the crashes by switching to an iterative solution. This is still a desirable change IMO because erroring files will do so faster.

This also switches to a walk function: see discussion in https://github.com/palantir/tslint/issues/2522

Fixes #18

bcherny commented 6 years ago

Thanks for the contribution @JoshuaKGoldberg! Please split this into multiple PRs, one per change you're making. Thanks!

JoshuaKGoldberg commented 6 years ago

me

will do

Edit: split the walk changes into their own PR; will update this one once that goes in.

JoshuaKGoldberg commented 6 years ago

I don't know why this blocks reopening the PR so I'll just make a new PR. 🤷

image