greg0ire / git_template

Automating your workflow with git
http://git-template.readthedocs.org/
GNU General Public License v3.0
227 stars 38 forks source link

Junkchecker check whole phrasefile line #52

Closed mikaelz closed 7 years ago

mikaelz commented 7 years ago

Part of my PHP debugging snippet is a comment as a reminder and it's useful for grepping

echo $test_var;exit; // @TODO remove this debug line

So I added remove this debug line to junkchecker's phrasefile, but the result of pre-commit was

Junk checker detected: test_junkchecker.php contains 'remove'.

With this PR it's

Junk checker detected: test_junkchecker.php contains 'remove this debug line'.
greg0ire commented 7 years ago

Thanks @mikaelz !

mikaelz commented 7 years ago

Added test case, but can't get it working:

$ shunit2 tests/junkchecker_test.sh 
ASSERT:Unknown failure encountered running a test

Ran 0 tests.

FAILED (failures=1)
 $ shunit2 tests/all.sh             
./tests/all.sh: line 14: ./README.md: Permission denied
ASSERT:Unknown failure encountered running a test

Ran 0 tests.

FAILED (failures=1)
greg0ire commented 7 years ago

I could both on Travis and locally, so it should be fine. In your case, I think the line 8 of tests/all.sh did not work. You can run all this with bash -x if you want to know more.