-
Notifications
You must be signed in to change notification settings - Fork 2
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
Separate out into alex() and alex.reporter() #4
Comments
That's a good idea to split the reporter out. I'll look into that soon. Can you show how you're using gulp-alex in a Gulp task? Typically, when an issue similar to only the first 16 files being examined is due to not configuring the Gulp task quite right, in my experience at least. Make sure there's a return statement within the task. If there is, there might be a bug in gulp-alex that we'll need to look into. |
It's about as minimal as can be:
This version quits after processing 16 files. If I put another task "downstream" it correctly pulls through the files (I've been lead to believe that this is because node streams don't keep pushing data unless something is "pulling" on the other end, but my understanding here is vague at best). So I tried adding something else downstream and, voila, this actually processes all the files (but then dumps the data into /tmp of course):
So ideally I'd like to not have to tack on something artificial to keep the stream fed, and looking at jshint it seems to split out the reporter as a separate task - which I like, but may actually be totally orthogonal to the issue I'm having. See gulpjs/gulp#716, which seems to indicate it's a limitation of the |
Can you please try gulp.task("alex", function() {
return gulp.src(content + "**/*.md")
.pipe(alex())
}); I believe adding the return statement should do the trick. If not, this is definitely a bug and I'll took a look into it. |
That fixes my issue! Awesome! It would still be nice to be able to configure it so it only outputs errors/warning and not all the files with "no issues found" - I have a lot of markdown files and only a few have issues. Also being able to emit the context would be cool but now I'm just getting greedy :-) |
Just discovered |
I think I have a fix for that in #5 if that's desired behavior (I think it should be?) |
Most linters do something like this, and it may help overcome some issues with streams. If you have a large set of files, gulp-alex will only receive the first 16 because there's nothing "downstream" pulling in more.
Also, this would enable configuring the reporter separately to e.g. only output files that have warnings and so forth.
The text was updated successfully, but these errors were encountered: