Skip to content

Commit

Permalink
Features/php psalm improvement (#3541)
Browse files Browse the repository at this point in the history
* implement PHP_PSALM linter config improvement (see feature request #3538)

* fix cspell linter dict about unknown word 'opcache'

* update changelog about feature #3538
  • Loading branch information
llaville authored May 5, 2024
1 parent 6f12f4b commit 1019329
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -1093,6 +1093,7 @@
"oldxml",
"onecolumn",
"onstart",
"opcache",
"openapi",
"openapirc",
"opencontainers",
Expand Down Expand Up @@ -1497,4 +1498,4 @@
"zaach",
"zricethezav"
]
}
}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l
- Fixes
- Change `golangci-lint` lint mode to `project`
- Disable sql-lint as it is no longer maintained
- Add new entries `findUnusedCode` and `findUnusedBaselineEntry` in default `psalm.xml` configuration file for PHP_PSALM linter. Related to <https://github.com/oxsecurity/megalinter/issues/3538>

- Doc
- Handle disabled_reason property in descriptors
Expand Down
7 changes: 6 additions & 1 deletion TEMPLATES/psalm.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>

<psalm xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://getpsalm.org/schema/config" xmlns="https://getpsalm.org/schema/config">
<psalm xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://getpsalm.org/schema/config"
xmlns="https://getpsalm.org/schema/config"
findUnusedCode="false"
findUnusedBaselineEntry="false"
>
</psalm>
2 changes: 2 additions & 0 deletions megalinter/descriptors/php.megalinter-descriptor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ install:
- php83-ctype
- php83-curl
- php83-dom
- php83-opcache
- php83-common
- php83-simplexml
- dpkg
dockerfile:
Expand Down

0 comments on commit 1019329

Please sign in to comment.