From 87fc1bc59bb8563fcc1fd694ad6eaba33a97d791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Wed, 26 Feb 2020 10:08:59 +0100 Subject: [PATCH] build(PHPCS): rename ruleset file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add syntax and coding style check to CI (#223) * Add syntax and coding style check to CI * Rename PHPCS config ...to make it discoverable * PHPCS ruleset file rename also in npm * Run php lint from npm * Update .scrutinizr.yml * ci(scrutinizr): adjust ruleset name Co-authored-by: Dominik Tränklein --- .scrutinizr.yml | 4 ++-- .travis.yml | 1 + package.json | 4 ++-- phpcs.ruleset.xml => phpcs.xml.dist | 0 4 files changed, 5 insertions(+), 4 deletions(-) rename phpcs.ruleset.xml => phpcs.xml.dist (100%) diff --git a/.scrutinizr.yml b/.scrutinizr.yml index d1b407fa9..45b441aa3 100644 --- a/.scrutinizr.yml +++ b/.scrutinizr.yml @@ -13,7 +13,7 @@ tools: php_code_sniffer: enabled: true config: - ruleset: ./phpcs.ruleset.xml + ruleset: ./phpcs.xml.dist standard: custom filter: paths: [./*] @@ -31,5 +31,5 @@ tools: checks: php: custom_coding_standard: - ruleset_path: phpcs.ruleset.xml + ruleset_path: phpcs.xml.dist javascript: true diff --git a/.travis.yml b/.travis.yml index 6a961e335..3f3a4bc8f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,4 +38,5 @@ before_script: - npm i script: + - find . -type f -not -path './node_modules/*' -not -path './vendor/*' -not -path './dist/*' -name '*.php' -print0|xargs -0 -L1 -P4 -- php -l - npm run lint diff --git a/package.json b/package.json index 92f6ea501..2132c33b9 100644 --- a/package.json +++ b/package.json @@ -16,10 +16,10 @@ "lint": "run-p --silent lint:*", "lint:scripts": "cross-env eslint '**/*.js'", "lint:styles": "cross-env stylelint '**/*.scss'", - "lint:php": "cross-env ./vendor/bin/phpcs --standard=phpcs.ruleset.xml", + "lint:php": "cross-env ./vendor/bin/phpcs", "lint:scripts:fix": "cross-env eslint '**/*.js' --fix", "lint:styles:fix": "cross-env stylelint '**/*.scss' --fix", - "lint:php:fix": "cross-env ./vendor/bin/phpcbf --standard=phpcs.ruleset.xml", + "lint:php:fix": "cross-env ./vendor/bin/phpcbf", "release": "standard-version -a", "releaseGithub": "conventional-github-releaser -p angular" }, diff --git a/phpcs.ruleset.xml b/phpcs.xml.dist similarity index 100% rename from phpcs.ruleset.xml rename to phpcs.xml.dist