stcheng/gulp-flowtype

Setting abort = true has no effect

r-peck opened this issue · 4 comments

The check for the abort flag is being done against args instead of opts. Since args.abort is always falsy, it never aborts.

Also, would be nice to emit events on error regardless of if it aborts or not, and/or include an indication of pass/fail with the 'end' event.

Cheers, will look into it asap!

Hi, this is fixed in the latest release.

As the file path and errors are already logged in the console, what else would need to be logged?

Cheers!

It wouldn't be additional logging, it would be emitting events to which the gulp task using this could react. Currently, if abort is false, the task has no clean way of determining if errors occurred or not. I was suggesting either an event that is emitted as the errors are encountered or an indication of if errors occurred being sent with the 'end' event.

This would enable a full run (errors across all files being processed) while still allowing the task to abort if necessary (or even more complex behavior, such as ensuring the number of errors encountered does not increase over the last known number if working with code known to have existing issues).