Thanks for the feedback. It's very valuable as I have a similar check I am working on for cucumber tags.

You are right, I shouldn't be shelling out twice. That was actually debugging code. I have removed it.

As far as the loop is concerned, my thought was that I only wanted to check the diff of `*_spec.rb` files, not the entire commit. Otherwise it might report false positives in non-spec files.

I suppose an alternative implementation might be to assume a sane project structure and pass `spec/` to the `git diff` call rather than individual file names. That would remove the loop. Would that be a preferable implementation to you?