Skip to content

Commit

Permalink
PHPCS: Add regex in descriptor to be able to extract the number of fo…
Browse files Browse the repository at this point in the history
…und errors (#2453)

* PHPCS: Add regex in descriptor to be able to extract the number of found errors

* Run linter jobs only in Pull requests

* [MegaLinter] Apply linters fixes

---------

Co-authored-by: nvuillam <nvuillam@users.noreply.github.com>
  • Loading branch information
nvuillam and nvuillam authored Mar 11, 2023
1 parent 031c116 commit 42b2cee
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/deploy-DEV-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@
#######################################
name: "Build & Deploy - DEV linters"
on:
push:
branches-ignore:
- main
paths-ignore:
- .github/CONTRIBUTING.md
- CHANGELOG.md
- README.md
- .github/workflows/slash-command-dispatch.yml
- .github/workflows/help-command.yml
- .github/workflows/build-command.yml
pull_request:
branches-ignore: []
paths-ignore:
Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-linter.yml file, or with `oxsecurity/megalinter:beta` docker image

- Add helm lint, by @ThomasSanson in https://github.com/oxsecurity/megalinter/pull/2386
- New linters
- Add [**helm lint**](https://helm.sh/docs/helm/helm_lint/), by @ThomasSanson in <https://github.com/oxsecurity/megalinter/pull/2386>

- Linter enhancements
- [phpcs](https://megalinter.io/latest/descriptors/php_phpcs/): Add regex in descriptor to be able to extract the number of found errors

- Core
- Run CI linter jobs only on Pull requests to avoid doubling jobs

- Linter versions upgrades
- [ansible-lint](https://ansible-lint.readthedocs.io/) from 6.14.1 to **6.14.2** on 2023-03-11
Expand Down
2 changes: 2 additions & 0 deletions megalinter/descriptors/php.megalinter-descriptor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ linters:
config_file_name: phpcs.xml
cli_lint_mode: list_of_files
cli_config_arg_name: "--standard="
cli_lint_errors_count: regex_number
cli_lint_errors_regex: "FOUND ([0-9]+) ERRORS"
examples:
- "phpcs myfile.php"
- "phpcs --standard=phpcs.xml myfile.php"
Expand Down

0 comments on commit 42b2cee

Please sign in to comment.