Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2021-01-15 10:53:48 +0300
committerGitHub <noreply@github.com>2021-01-15 10:53:48 +0300
commitb38578b468d694534db5fabe356db5ffdc58bd6e (patch)
treef9d0307513b614d966075d946ac5e68bed1c660a /.github
parent6f957d15b4db3b0d8d54f046de33207044f87681 (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.yml17
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