From 61d24eede6fa6bac58f92cada9f2189ebf1dad0a Mon Sep 17 00:00:00 2001 From: David Remer Date: Thu, 27 Aug 2020 11:07:01 +0300 Subject: [PATCH] setup coding standards --- .github/workflows/php.yml | 2 +- composer.json | 2 +- phpcs.xml.dist | 23 +++++++++++++++++------ 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 0edeca820..e12cbc447 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -29,4 +29,4 @@ jobs: - name: Run test suite run: ./vendor/bin/phpunit - name: Run cs - run: ./vendor/bin/phpcs src modules.local/ppcp-wc-gateway/src/ modules.local/ppcp-webhooks/src/ modules.local/ppcp-button/src/ modules.local/ppcp-onboarding/src/ modules.local/ppcp-subscription/src --standard=Inpsyde + run: ./vendor/bin/phpcs src modules.local/ppcp-wc-gateway/src/ modules.local/ppcp-webhooks/src/ modules.local/ppcp-button/src/ modules.local/ppcp-onboarding/src/ modules.local/ppcp-subscription/src diff --git a/composer.json b/composer.json index f15b06f06..c9f3323c7 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ "ext-json": "*" }, "require-dev": { - "inpsyde/php-coding-standards": "^1", + "woocommerce/woocommerce-sniffs": "^0.1.0", "phpunit/phpunit": "^9.1", "brain/monkey": "^2.4" }, diff --git a/phpcs.xml.dist b/phpcs.xml.dist index d04543470..56d3882f7 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -1,10 +1,21 @@ - - - ./src - ./modules.local + + My projects ruleset. + + + - *\.(inc|css|js)$ - *\.(inc|css|js)$ + + + + + + + + + + + tests/ +