move some lint checks to Makefile
This commit is contained in:
parent
0a07d44ebd
commit
f48018374a
|
@ -7,6 +7,7 @@ js/
|
|||
report
|
||||
clover.xml
|
||||
composer.lock
|
||||
appinfo/info.xsd
|
||||
|
||||
# just sane ignores
|
||||
.*.sw[po]
|
||||
|
|
|
@ -39,12 +39,6 @@ before_install:
|
|||
- cd apps/$APP_NAME
|
||||
|
||||
script:
|
||||
# Check info.xml schema validity
|
||||
- wget https://apps.nextcloud.com/schema/apps/info.xsd
|
||||
- xmllint appinfo/info.xml --schema info.xsd --noout
|
||||
- rm info.xsd
|
||||
# Check PHP syntax errors
|
||||
- find . -name \*.php -exec php -l "{}" \;
|
||||
# Check app validity
|
||||
- php ../../occ app:check-code notes
|
||||
# Run PHP unit tests (skipped due to errors)
|
||||
|
|
10
Makefile
10
Makefile
|
@ -91,9 +91,12 @@ test-coverage:
|
|||
npm run test:coverage
|
||||
|
||||
# Linting
|
||||
lint: lint-php lint-js lint-css
|
||||
lint: lint-php lint-js lint-css lint-nextcloud
|
||||
|
||||
lint-php:
|
||||
# Check PHP syntax errors
|
||||
@! find lib/ -name "*.php" | xargs -I{} php -l '{}' | grep -v "No syntax errors detected"
|
||||
# PHP CodeSniffer
|
||||
vendor/bin/phpcs --standard=phpcs.xml --runtime-set ignore_warnings_on_exit 1 appinfo/ lib/
|
||||
|
||||
lint-js:
|
||||
|
@ -102,6 +105,11 @@ lint-js:
|
|||
lint-css:
|
||||
npm run stylelint
|
||||
|
||||
lint-nextcloud:
|
||||
# Check info.xml schema validity
|
||||
wget https://apps.nextcloud.com/schema/apps/info.xsd -P appinfo/ -N --no-verbose || [ -f appinfo/info.xsd ]
|
||||
xmllint appinfo/info.xml --schema appinfo/info.xsd --noout
|
||||
|
||||
# Fix lint
|
||||
lint-fix: lint-php-fix lint-js-fix lint-css-fix
|
||||
|
||||
|
|
Loading…
Reference in New Issue