I just want to be able to run it to see if the code in my working tree passes it, without actually attempting a commit.
Just run git commit. You don't have to add anything before doing this, hence in the end you get the message no changes added to commit.
git commit
no changes added to commit