Some projects may find SensioLabsInsight analysis too exhaustive or too strict. In those cases, you can opt for ignoring all the violations related to a particular analysis rule. To do so, follow these steps:
1 Go to any analysis page, locate the rule to ignore and click on the small trash icon displayed at the right of the rule title.
2 Optionally, use the pop-up form to comment the reasons for ignoring these
violations and check the
Stop analyzing this rule option to prevent them
from appearing again in future analysis.
Alternatively, you can use the custom project configuration to ignore or to modify the behavior of every SensioLabsInsight rule:
1 Click on the
Edit project link at the top right of a project or
2 Ignore rule violations by adding a custom project configuration in the
Configuration option. For instance, if you want to ignore the rule that
checks the length of the PHP classes, use this configuration:
1 2 3
rules: php.class_too_long: enabled: false
3 If you don't want to disable a rule entirely, you can tweak its behavior to be less strict. Using the same example as above, replace the previous configuration with the following, to increase the limits defined by this rule:
1 2 3 4
rules: php.class_too_long: max_length: 2000 threshold: 10
Click on the
View sample link at the bottom of that page to get the complete
SensioLabsInsight configuration reference. This reference contains all the
available rules and all their configuration parameters and default values.