pmcalabrese/gulp-logwarn

Unable to specify default substrings

Closed this issue · 6 comments

Hi,

just checked this tool and found out that I can't use it because default substrings are hardcoded and I'm unable to change them. For example I would like to leave $log calls because I can easily disable them whenever I want and I want gulp to throw only when console.log calls are left...

The fix should be very simple..

P.S. it would also be nice to have option for disabling successful file scan and only report the ones that contain logs

Hi, you can extend by adding the strings you need to check to an array that you pass to logwarn method...so it will look something like this:

logwarn(["console.debug","$log.info","DEBUG"])

This will check for the defaults string and the string "console.debug" "$log.info" and "DEBUG"
A star is appracieted :)

I know that, but I don't want to extend, I want to remove $log from default substrings

Ohh i see.. i will take in account at next release

+1 for disabling the logs of files without logs. Would be super nice to only see gulp log messages for files with logs in them.

@mike-engel Yep i see ... I'll address that in the next release too. stars are appreciated :)

This has been fixed so... from now on you need to specify the strings you need to look for. https://github.com/pmcalabrese/gulp-logwarn#how-it-works