tlint
tlint copied to clipboard
Add linter rule disallowing `test_` method prefix in tests
Per @mattstauffer, this PR adds a rule disallowing the use of the test
prefix on test methods, instead suggesting the /** @test */
annotation. It will catch any public test method beginning with test
.
I've updated the Tighten preset to include this linter, so this PR is a breaking change.
Looks good to me! I don't know how we handle breaking changes in the Tighten preset that aren't breaking changes in the tool itself. LMK if y'all need any input from me on that.
@sbine this looks good! I'm inclined to add this to Tighten Coding Standard using php_unit_test_annotation. This will give us both linting and fixing without us having to maintain this functionality. After Tighten Coding Standard is updated, I have a PR to remove duplicate functionality in TLint, allowing us to focus TLint development on features not covered by other tools. Does that make sense?
If you have time, I'd love feedback on the above Tighten Coding Standard PR.