Merge pull request #50 from nextcloud/add-appcode-checker

Add appcode checker
This commit is contained in:
Lukas Reschke 2016-10-17 11:39:30 +02:00 коммит произвёл GitHub
Родитель 84117e76eb e620e508ca
Коммит 8f9cb3db4b
2 изменённых файлов: 31 добавлений и 1 удалений

Просмотреть файл

@ -3,7 +3,37 @@ pipeline:
image: nextcloudci/eslint:eslint-1
commands:
- ./run-eslint.sh
when:
matrix:
TESTS: eslint
stylelint:
image: nextcloudci/stylelint:stylelint-1
commands:
- ./run-stylelint.sh
when:
matrix:
TESTS: stylelint
check-app-compatbility:
image: nextcloudci/php5.6:php5.6-3
environment:
- APP_NAME=spreed
- CORE_BRANCH=master
- DB=sqlite
commands:
# Pre-setup steps
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
- cd ../server
# Code checker
- ./occ app:check-code $APP_NAME
- cd apps/$APP_NAME/
when:
matrix:
TESTS: check-app-compatbility
matrix:
include:
- TESTS: eslint
- TESTS: stylelint
- TESTS: check-app-compatbility

Просмотреть файл

@ -78,7 +78,7 @@ class AppSettingsController extends Controller {
'min_range' => 1,
),
);
if (count($parts) == 2 && !filter_var($parts[1], FILTER_VALIDATE_INT, $options)) {
if (count($parts) === 2 && !filter_var($parts[1], FILTER_VALIDATE_INT, $options)) {
return array('data' =>
array('message' =>
(string) $this->l10n->t('Invalid port specified.')