diff options
author | Stefan Giehl <stefan@matomo.org> | 2021-01-15 10:53:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-15 10:53:48 +0300 |
commit | b38578b468d694534db5fabe356db5ffdc58bd6e (patch) | |
tree | f9d0307513b614d966075d946ac5e68bed1c660a /.github | |
parent | 6f957d15b4db3b0d8d54f046de33207044f87681 (diff) |
Introduce PHP CS to improve code quality (#16755)
* Adds PHP CS with a basic config
* automatically check coding style for pull requests
* Disallow usage of eval & create_function and force using Common::safe_unserialize instead of unserialize
* Forbid inline control structures
* fix test
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/phpcs.yml | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/.github/workflows/phpcs.yml b/.github/workflows/phpcs.yml new file mode 100644 index 0000000000..169942b071 --- /dev/null +++ b/.github/workflows/phpcs.yml @@ -0,0 +1,17 @@ +name: PHPCS check + +on: pull_request + +jobs: + phpcs: + name: PHPCS + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install dependencies + run: composer install --dev --prefer-dist --no-progress --no-suggest + - name: PHPCS check + uses: chekalsky/phpcs-action@v1 + with: + phpcs_bin_path: './vendor/bin/phpcs' + enable_warnings: true
\ No newline at end of file |