Closed (works as designed)
Project:
Coder
Version:
8.x-2.x-dev
Component:
Coder Sniffer
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Jun 2014 at 21:59 UTC
Updated:
19 Feb 2017 at 16:25 UTC
Jump to comment: Most recent
Comments
Comment #1
klausiUnfortunately I don't see a command line option to specify sniff codes to be ignored. There is only the --sniffs switch which lets you select sniffs that you want, but cannot specify those that you don't want.
I would suggest to create your own PasswordPolicy Standard ruleset.xml file, register that as separate standard with PHPCS, include everything from Drupal and specify ignore rules for certain sniff codes.
Comment #2
aohrvetpv commentedI am not trying to use Coder Review from the command line. I think I may not have been clear in this request.
Coder Review currently has a feature that lets you ignore certain rules by adding a tag like:
@ignore some_rule_here:fileThat causes the individual rule to be ignored for the entire file when running a review. The problem, though, is if you want to ignore the rule on a module level, you have to put that line in every code file.
A module (or project) scope is desired so you can just put
@ignore some_rule_here:moduleand have the rule ignored for the entire project.There are varying scopes for
@ignore. You can also ignore with line or function scope. It would seem to make sense to have a module scope to complete the gamut of scopes from broad to narrow.Comment #4
aohrvetpv commentedSetting back active because I think the original request may have not been clear. Please see #2.
Comment #5
aohrvetpv commentedComment #6
mikeytown2 commentedWould also like to ignore all rules if including some 3rd party code: js, etc...
Comment #7
klausiWhat can do now is create a custom phpcs.xml file in your project and specify sinffs that you want applied, files you want to ignore etc. See for example Drupal core's phpcs.xml.dist file http://cgit.drupalcode.org/drupal/tree/core/phpcs.xml.dist
I think that should be enough flexibility for custom projects.