diff options
-rw-r--r-- | .github/workflows/lint.yml | 2 | ||||
-rw-r--r-- | composer.json | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 826ffddec..34e9d1787 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -26,7 +26,7 @@ jobs: coverage: none - name: Lint - run: "find . -name \\*.php -not -path './vendor/*' -exec php -l \"{}\" \\;" + run: composer run lint || ( echo 'Please run `composer run lint` and fix your code' && exit 1 ) php-cs-fixer: name: php-cs check diff --git a/composer.json b/composer.json index e24197271..1c5cd09ae 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,8 @@ { "scripts": { "cs:check": "php-cs-fixer fix --dry-run --diff", - "cs:fix": "php-cs-fixer fix" + "cs:fix": "php-cs-fixer fix", + "lint": "find . -name \\*.php -not -path './vendor/*' -not -path './build/*' -not -path './tests/integration/vendor/*' -print0 | xargs -0 -n1 php -l" }, "require-dev": { "nextcloud/coding-standard": "^0.3.0" |