From 31bb65fa360d1f6bb5fb5e4569160e8f006b841a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 9 May 2017 16:49:56 +0200 Subject: Check the name length of database items Signed-off-by: Joas Schilling --- core/Command/App/CheckCode.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'core/Command/App') diff --git a/core/Command/App/CheckCode.php b/core/Command/App/CheckCode.php index 1effed99566..f787529bef9 100644 --- a/core/Command/App/CheckCode.php +++ b/core/Command/App/CheckCode.php @@ -26,6 +26,7 @@ namespace OC\Core\Command\App; use OC\App\CodeChecker\CodeChecker; +use OC\App\CodeChecker\DatabaseSchemaChecker; use OC\App\CodeChecker\EmptyCheck; use OC\App\CodeChecker\InfoChecker; use OC\App\CodeChecker\LanguageParseChecker; @@ -181,6 +182,18 @@ class CheckCode extends Command implements CompletionAwareInterface { } $errors = array_merge($errors, $languageErrors); + + $databaseSchema = new DatabaseSchemaChecker(); + $schemaErrors = $databaseSchema->analyse($appId); + + foreach ($schemaErrors['errors'] as $schemaError) { + $output->writeln("$schemaError"); + } + foreach ($schemaErrors['warnings'] as $schemaWarning) { + $output->writeln("$schemaWarning"); + } + + $errors = array_merge($errors, $schemaErrors['errors']); } $this->analyseUpdateFile($appId, $output); -- cgit v1.2.3