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

github.com/nextcloud/notes.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkorelstar <korelstar@users.noreply.github.com>2019-08-28 22:45:15 +0300
committerkorelstar <korelstar@users.noreply.github.com>2019-08-28 23:13:50 +0300
commitf48018374af5bc62db68ee3aed1a7eeabd4eeab8 (patch)
tree14ca741ebc4ad81eedd9822a0b9adcefc27f53f3 /Makefile
parent0a07d44ebd0688f05463305ac27d9dfa032f2043 (diff)
move some lint checks to Makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 3cc9399d..6ad60d4c 100644
--- a/Makefile
+++ b/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