Debugger False Positive
Closed this issue · 4 comments
jfelchner commented
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"
).
mpapis commented
just open PR with this change https://github.com/jish/pre-commit/blob/master/lib/plugins/pre_commit/checks/debugger.rb#L16
mpapis commented
did you try the proposed fix?