-1

Currently, I run

grep -rnI "TODO" foodir

and tox to check if I can commit. Is there a way to make tox fail if the grep returns something?

Martin Thoma
  • 124,992
  • 159
  • 614
  • 958

1 Answers1

1

exit 1 should be enough. Something like this in tox.ini:

[testenv]
commands =
    grep -FInrq TODO . && exit 1 || exit 0
phd
  • 82,685
  • 13
  • 120
  • 165