Skip to content

Commit

Permalink
Fixed docs for PHPMD.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed Apr 16, 2024
1 parent 67f0774 commit 63b13fb
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions .scaffold/docs/content/tools/phpmd.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,14 @@ exclusion patterns to exclude files and directories.
## Ignoring

Ignoring rules **globally** takes place in
the [`phpstan.neon`](https://github.com/drevops/scaffold/blob/develop/phpstan.neon) file:

```yaml
parameters:
ignoreErrors:
- # Comment about why this rules is excluded.
# 'message' is a regular expression with `#` as begin and end delimiters.
message: '#.*no value type specified in iterable type array.#'
paths:
- path/to/exclude/all_dir_files/*
- path/to/exclude/a_file.php
the [`phpmd.xml`](https://github.com/drevops/scaffold/blob/develop/phpmd.xml) file:

```xml
<rule ref="rulesets/cleancode.xml/MissingImport">
<properties>
<property name="ignore-global" value="true"/>
</properties>
</rule>
```

PHPMD does not support ignoring of **all PHPMD rules** within a file.
Expand Down

2 comments on commit 63b13fb

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.