Define evaluation rules to ignore

Edit on GitHub

When a rule is irrelevant for your project, you can configure it to be ignored. An ignored rule is still used to evaluate the code, related messages are returned in CLI output and reports. However, failing to comply with the rule does not result in exit code 1 from the analyze:php:code-compliance command.

To ignore one or more rules, follow the steps:

  1. Create /tooling.yaml
  2. Add rules to the ignore list. For example, add NotUnique:Constant:
evaluator:
  rules:
    ignore:
      - NotUnique:Constant

If code does not comply with the NotUnique:Constant rule, now only warnings are returned.