jish/pre-commit

Debugger False Positive

Closed this issue · 4 comments

When executing the debugger check, if the word 'debugger' exists anywhere in the file the commit fails. The check should be more like this:

/^\s*debugger/

That will catch almost all usages of 'debugger' without getting the tons of false positives like when it's mentioned in comments, TODOs, documentation, as a symbol :debugger or inside of a string ("Make sure to enable the debugger if you're unsure of what this code does").

did you try the proposed fix?

@mpapis apologies, I'm using overcommit now. I'll close this.

jish commented

Fixed in d144398