We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I would like the ability to disable rules in my deptrac.yaml without the use of custom events. (c.f. #1220.) Maybe something like this, for example:
deptrac.yaml
deptrac: disable_rules: - DependsOnInternalToken
Examples from some other tools provide might be helpful:
https://phpstan.org/config-reference
parameters: # Enable/disable a feature by boolean "switch": treatPhpDocTypesAsCertain: false # Ignore errors by path: ignoreErrors: - message: '#Function pcntl_open not found\.#' paths: - build - tests
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset
<ruleset name="Custom Standard" namespace="MyProject\CS\Standard"> <!-- Configure a feature: --> <config name="zend_ca_path" value="/path/to/ZendCodeAnalyzer"/> <!-- Exclude all by path: --> <exclude-pattern>*/tests/*</exclude-pattern> <exclude-pattern>*/data/*</exclude-pattern> <!-- Exclude a rule by path: --> <rule ref="Squiz"> <exclude name="Squiz.PHP.CommentedOutCode"/> </rule> <!-- Exclude a single sniff message. --> <rule ref="Squiz"> <exclude name="Squiz.Strings.DoubleQuoteUsage.ContainsVar"/> </rule> <!-- Exclude a whole category of sniffs. --> <rule ref="Squiz"> <exclude name="Squiz.PHP"/> </rule> <!-- Exclude by path: --> <rule ref="Squiz.Strings.DoubleQuoteUsage"> <exclude-pattern>*/tests/*</exclude-pattern> <exclude-pattern>*/data/*</exclude-pattern> </rule> </ruleset>
https://psalm.dev/docs/running_psalm/dealing_with_code_issues/
<issueHandlers> <!-- Exclude a rule altogether. --> <MissingPropertyType errorLevel="suppress" /> <!-- Exclude a rule by path. --> <InvalidReturnType> <errorLevel type="suppress"> <directory name="some_bad_directory" /> <file name="some_bad_file.php" /> </errorLevel> </InvalidReturnType> </issueHandlers>
https://phpmd.org/documentation/creating-a-ruleset.html#excluding-rules-from-a-rule-set
<ruleset> <!-- Exclude parts of a rule. --> <rule ref="rulesets/naming.xml"> <exclude name="LongClassName"/> <exclude name="ShortVariable" /> <exclude name="LongVariable" /> </rule> </ruleset>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I would like the ability to disable rules in my
deptrac.yaml
without the use of custom events. (c.f. #1220.) Maybe something like this, for example:Examples from some other tools provide might be helpful:
PHPStan
https://phpstan.org/config-reference
PHPCS
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset
Psalm
https://psalm.dev/docs/running_psalm/dealing_with_code_issues/
PHPMD
https://phpmd.org/documentation/creating-a-ruleset.html#excluding-rules-from-a-rule-set
The text was updated successfully, but these errors were encountered: