owncloud/core

View on GitHub

Showing 4,504 of 4,504 total issues

File ru.js has 404 lines of code (exceeds 250 allowed). Consider refactoring.
Open

OC.L10N.register(
    "settings",
    {
    "Wrong current password" : "Старый пароль неверен",
    "The new password cannot be the same as the previous one" : "Новый пароль не совпадать с предыдущим",
Severity: Minor
Found in settings/l10n/ru.js - About 5 hrs to fix

    File es.js has 403 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    OC.L10N.register(
        "settings",
        {
        "Wrong current password" : "Contraseña actual equivocada",
        "The new password cannot be the same as the previous one" : "La contraseña nueva no puede ser igual a la anterior",
    Severity: Minor
    Found in settings/l10n/es.js - About 5 hrs to fix

      File bg_BG.js has 403 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      OC.L10N.register(
          "settings",
          {
          "Wrong current password" : "Грешна текуща парола",
          "The new password cannot be the same as the previous one" : "Новата парола не може да бъде същата като предишната.",
      Severity: Minor
      Found in settings/l10n/bg_BG.js - About 5 hrs to fix

        File ko.js has 403 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        OC.L10N.register(
            "settings",
            {
            "Wrong current password" : "현재 비밀번호가 잘못되었습니다",
            "The new password cannot be the same as the previous one" : "새 비밀번호는 이전 비밀번호와 같을 수 없습니다",
        Severity: Minor
        Found in settings/l10n/ko.js - About 5 hrs to fix

          FederatedShareProvider has 42 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class FederatedShareProvider implements IShareProvider {
              public const SHARE_TYPE_REMOTE = 6;
          
              /** @var IDBConnection */
              private $dbConnection;
          Severity: Minor
          Found in apps/federatedfilesharing/lib/FederatedShareProvider.php - About 5 hrs to fix

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                            if(!result || result.status !== 'success') {
                                if (result.data && result.data.message) {
                                    OC.Settings.Apps.showErrorMessage(appId, result.data.message);
                                    appItem.data('errormsg', result.data.message);
                                } else {
            Severity: Major
            Found in settings/js/admin-apps.js and 1 other location - About 5 hrs to fix
            settings/js/admin-apps.js on lines 274..294

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 148.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            OC.L10N.register(
                "files_external",
                {
                "Step 1 failed. Exception: %s" : "প্রথম ধাপ ব্যার্থ। ব্যতিক্রম: %s",
                "External storage" : "বাহ্যিক সংরক্ষণাগার",
            Severity: Major
            Found in apps/files_external/l10n/bn_BD.js and 1 other location - About 5 hrs to fix
            apps/files/l10n/de_AT.js on lines 1..31

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 148.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            OC.L10N.register(
                "files",
                {
                "Unknown error" : "Unbekannter Fehler",
                "Close" : "Schliessen",
            Severity: Major
            Found in apps/files/l10n/de_AT.js and 1 other location - About 5 hrs to fix
            apps/files_external/l10n/bn_BD.js on lines 1..31

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 148.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                            if(!result || result.status !== 'success') {
                                if (result.data && result.data.message) {
                                    OC.Settings.Apps.showErrorMessage(appId, result.data.message);
                                    appItem.data('errormsg', result.data.message);
                                } else {
            Severity: Major
            Found in settings/js/admin-apps.js and 1 other location - About 5 hrs to fix
            settings/js/admin-apps.js on lines 300..360

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 148.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            File Scan.php has 401 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            /**
             * @author Bart Visscher <bartv@thisnet.nl>
             * @author Jörn Friedrich Dreyer <jfd@butonic.de>
             * @author martin.mattel@diemattels.at <martin.mattel@diemattels.at>
            Severity: Minor
            Found in apps/files/lib/Command/Scan.php - About 5 hrs to fix

              Method setupFS has 140 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public static function setupFS($user = '', $fullInit = true) {
                      //setting up the filesystem twice can only lead to trouble
                      if (self::$fsSetup) {
                          return false;
                      }
              Severity: Major
              Found in lib/private/legacy/util.php - About 5 hrs to fix

                Function createFileChunked has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
                Open

                    private function createFileChunked($data) {
                        list($path, $name) = \Sabre\Uri\split($this->path);
                
                        $info = \OC_FileChunking::decodeName($name);
                        if (empty($info)) {
                Severity: Minor
                Found in apps/dav/lib/Connector/Sabre/File.php - About 5 hrs to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Function getFileInfo has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
                Open

                    protected function getFileInfo($path) {
                        $this->log('enter: '.__FUNCTION__."($path)");
                        $path = $this->buildPath($path);
                        if (!isset($this->statCache[$path])) {
                            try {
                Severity: Minor
                Found in apps/files_external/lib/Lib/Storage/SMB.php - About 5 hrs to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Function execute has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
                Open

                    protected function execute(InputInterface $input, OutputInterface $output): int {
                        $appNameSubString = $input->getArgument('search-pattern');
                        $minimalView = $input->getOption('minimal');
                
                        if ($input->getOption('shipped') === 'true' || $input->getOption('shipped') === 'false') {
                Severity: Minor
                Found in core/Command/App/ListApps.php - About 5 hrs to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                File it.js has 399 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                OC.L10N.register(
                    "settings",
                    {
                    "Wrong current password" : "Password corrente errata",
                    "The new password cannot be the same as the previous one" : "La nuova password non può essere identica alla precedente",
                Severity: Minor
                Found in settings/l10n/it.js - About 5 hrs to fix

                  Function _createRow has 139 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          _createRow: function(fileData, options) {
                              var td, simpleSize, basename, extension, sizeColor,
                                  icon = fileData.icon || this._getIconUrl(fileData),
                                  name = fileData.name,
                                  // TODO: get rid of type, only use mime type
                  Severity: Major
                  Found in apps/files/js/filelist.js - About 5 hrs to fix

                    File zh_CN.js has 398 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    OC.L10N.register(
                        "settings",
                        {
                        "Wrong current password" : "密码错误",
                        "The new password cannot be the same as the previous one" : "新密码不能和之前的密码相同",
                    Severity: Minor
                    Found in settings/l10n/zh_CN.js - About 5 hrs to fix

                      File th_TH.js has 398 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      OC.L10N.register(
                          "settings",
                          {
                          "Wrong current password" : "รหัสผ่านปัจจุบันไม่ถูกต้อง",
                          "The new password cannot be the same as the previous one" : "รหัสผ่านใหม่ต้องไม่ซ้ำกับรหัสเดิมที่เคยใช้มาก่อน",
                      Severity: Minor
                      Found in settings/l10n/th_TH.js - About 5 hrs to fix

                        File el.js has 397 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        OC.L10N.register(
                            "settings",
                            {
                            "Wrong current password" : "Εσφαλμένο τρέχον συνθηματικό",
                            "The new password cannot be the same as the previous one" : "Το νέο συνθηματικό δεν πρέπει να είναι το ίδιο με το προηγούμενο",
                        Severity: Minor
                        Found in settings/l10n/el.js - About 5 hrs to fix

                          File helper.php has 397 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          <?php
                          /**
                           * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
                           * @author Bart Visscher <bartv@thisnet.nl>
                           * @author Björn Schießle <bjoern@schiessle.org>
                          Severity: Minor
                          Found in lib/private/legacy/helper.php - About 5 hrs to fix
                            Severity
                            Category
                            Status
                            Source
                            Language