Syntax errors don't say in which file the problem is found
mig82 opened this issue · 0 comments
mig82 commented
I'm running this analysis in a directory where I have close to 100 Javascript files, one of which has a syntax error -related to C-style preprocessor directives.
var mySettings = {
//#ifdef FOO_CONSTANT
setting : constants.FOO_SETTING
//#endif
//#ifdef BAR_CONSTANT
setting : constants.BAR_SETTING
//#endif
};
The analysis was crashing because of this syntax error, which I just have to bear with. I got around it by excluding this file from the analysis, but it took me forever to find what the problem was because while it does say what the problem is, it doesn't say in which file.
$ grunt --force
Running "complexity:generic" (complexity) task
Warning: undefined: Unexpected token, expected , (175:1) Used --force, continuing.
Done, but with warnings.
Note that using --force
didn't get the analysis to continue.
I suggest the error should say which file was being analysed when the problem was found.