Closed (fixed)
Project:
Coder
Version:
8.x-3.x-dev
Component:
Coder Sniffer
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
24 Aug 2018 at 18:48 UTC
Updated:
6 May 2019 at 11:19 UTC
Jump to comment: Most recent
Comments
Comment #2
earelin commentedI have the same problem
Comment #3
kunalkursija commentedWhat version of PHPCS are you using?
If you refer this documentation https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-parts-of-a-file then it says the following:
If your PHPCS version is lesser than 3.2.0, then excluding specific sniffs might not be done?
Comment #4
liam morlandI'm running 3.4.1.
Comment #5
klausiWith the --exclude option you can only exclude full sniffs like Drupal.Commenting.FunctionComment. You cannot exclude parts like Drupal.Commenting.FunctionComment.MissingParamType.
To do that you need create a phpcs.xml.dist file in your project, see https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset or https://git.drupalcode.org/project/drupal/blob/8.8.x/core/phpcs.xml.dist for example.
Comment #6
liam morlandThanks