ignoreFailures for codnarcTest

I’m trying to figure out the answer to this question on stackoverflow. I want to add checks for codenarcMain but not for codenarcTest. How can I ignoreFailures for codenarcTest only?