Skip to content

Properties of custom sniffs cannot be configured #432

@Pittiplatsch

Description

@Pittiplatsch

The following does not work:

 <rule ref="path/to/my/Custom/Sniff.php"> <properties> <property name="foo" value="bar" /> </properties> </rule> 

$this->ruleset[$code]['properties'][$name] = $values;
sets the properties to $this->ruleset[$code]['properties'] with $code being path/to/my/Custom/Sniff.php, while on actually pushing the properties into the sniffer instance in
if (isset($this->ruleset[$code]['properties']) === true) {
$code contains the "short" name Custom.Sniff, which obviously doesn't match the array structure $this->ruleset.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions