grunt-complexity
grunt-complexity copied to clipboard
Blank js files throw "Invalid Source" Error
Blank js files throw "Invalid Source" Error
Running "complexity:src" (complexity) task
Warning: Invalid source Use --force to continue.
Error: Invalid source
. . .
Aborted due to warnings.
I think it would probably be better to either omit/ignore the error created by empty files and just skip over them in the source array (As I think it would be better not to halt the process because of this), or provide a better error message saying "Empty files cannot be analysed". Invalid source is a bit misleading in this regard, in my opinion.
Thanks in advance!
I agree.
Merged a fix to make the error message better. Seems like the next step would be to ignore empty files. What do you think?
In the mean time, https://github.com/vigetlabs/grunt-complexity/pull/37/commits/91dc55fa05eea28e78acac2882867c79cc21abc5 should eliminate the confusion.
https://github.com/vigetlabs/grunt-complexity/releases/tag/v0.4.0