diff options
author | Joas Schilling <coding@schilljs.com> | 2017-05-09 16:49:56 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-05-16 16:16:11 +0200 |
commit | 31bb65fa360d1f6bb5fb5e4569160e8f006b841a (patch) | |
tree | d52ff4f44069cf94e3029aadd82f7cffa7f77fbd /core | |
parent | 93fc7fcdbef0fdd0fda1ea2be9047817bb68524c (diff) | |
download | nextcloud-server-31bb65fa360d1f6bb5fb5e4569160e8f006b841a.tar.gz nextcloud-server-31bb65fa360d1f6bb5fb5e4569160e8f006b841a.zip |
Check the name length of database items
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/Command/App/CheckCode.php | 13 |
1 files changed, 13 insertions, 0 deletions
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("<error>$schemaError</error>"); + } + foreach ($schemaErrors['warnings'] as $schemaWarning) { + $output->writeln("<comment>$schemaWarning</comment>"); + } + + $errors = array_merge($errors, $schemaErrors['errors']); } $this->analyseUpdateFile($appId, $output); |