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

infrastructure: move test/check-complexity to ESLint complexity check #2059

Closed
ljqx opened this issue Dec 7, 2020 · 0 comments · Fixed by #2062
Closed

infrastructure: move test/check-complexity to ESLint complexity check #2059

ljqx opened this issue Dec 7, 2020 · 0 comments · Fixed by #2062

Comments

@ljqx
Copy link
Contributor

ljqx commented Dec 7, 2020

https://github.com/jquery/esprima/blob/master/test/check-complexity.js calculates cyclomatic complexity for every function, and prints out the most complex 6 functions.

If any function has complexity > 24, the test would fail.

There are several drawbacks here:

As ESLint already natively supports limiting complexity, better to move to ESLint, which is already used in this repo.

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

Successfully merging a pull request may close this issue.

1 participant