Is it possible to ignore/exclude parts of a file in the coding standard (the xml file)? #3873
-
As the title says. Context: We do not have a linter in use in our project, but none the less an informal standard is enforced. To make my life easier in MRs and make sure the code fits that informal standard, I use phpcs to point out and fix things. As we all know: You can't always fix all problems and have to use phpcs:ignore or similar. The problem is, of course, that comments like this shouldn't be part of the code base, since no one else is using phpcs (yet, I hope. But that's a different discussion). So I would like a way to ignore certain parts of files from the coding standard file (the xml file). I tried to search in issues and discussions and checked the wiki for this feature (to no avail)- but I thought I'd ask here, just to be sure. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@finn-matti The only way to do this with PHPCS is by using |
Beta Was this translation helpful? Give feedback.
@finn-matti The only way to do this with PHPCS is by using
// phpcs:disable
/// phpcs:enable
annotations in the file itself.The xml file cannot be used for this.