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

Errors getting missed/ignored when piping multiple jsx files. #16

Open
craigkj opened this issue Aug 17, 2015 · 0 comments
Open

Errors getting missed/ignored when piping multiple jsx files. #16

craigkj opened this issue Aug 17, 2015 · 0 comments

Comments

@craigkj
Copy link

craigkj commented Aug 17, 2015

I noticed that certain errors would be 'missed' from my gulp-jsxcs task when run across a large (ish) number of files; when running the task against one (or a smaller number) of files the error would show up as expected.

Upon investigation I tracked the problem down the the maxErrors limit set in the dependency jscs/lib/config/configuration.js which limits the number of errors returned to gulp-jsxcs index.js file. Because .jsx files cause lots of jscs errors due to the syntax not being recognised (that we consider invalid and filter out), if any valid errors occur after these 'invalid' ones fill up the 'limit' they are never added to the error list and then after the 'invalid' errors are filtered out in index.js's checker.checkString() the task completes without any errors which is incorrect.

Changing:
maxErrors = 50;
to:
maxErrors = 500;

or higher leads to the (wanted) errors turning up again, but this is definitely not an ideal solution to this problem as I'm required to set the limit to an arbitrary large number in order to ensure that my handful of genuine errors turn up, and even then I can't be 100% sure that its working.

Given the restrictions of jscs it might not be particularly easy to resolve this, but hopefully I'm wrong.

Thanks, C

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

No branches or pull requests

1 participant