Replies: 1 comment 3 replies
-
Thanks for opening this discussion. There are some rules in our PHPCS config that would interfere with PHPUnit, so we exclude the directory to avoid developer frustration. However, I do understand that at least a subset of our rules would be useful to have apply to test cases. Perhaps, rather than excluding the tests directory completely, we could instead disable certain rules? 🤔 |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We're currently excluding files in
tests
directories from being sniffed. There's likely a good reason for this, and we may want to enforce a different ruleset for these files than within our application code.However, without any sniffing whatsoever, it's easy to hit formatting issues which would otherwise be avoided.
Further to this there may be test-specific sniffs we could implement. I haven't looked into anything at this stage, but as there are conventions which need to be followed in relation to how test files and methods are named, PHPCS may be able to help us out here.
Beta Was this translation helpful? Give feedback.
All reactions