owncloud/core

View on GitHub

Showing 4,503 of 4,503 total issues

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

OC.L10N.register(
    "settings",
    {
    "Authentication error" : "Greška pri autentifikaciji",
    "Couldn't send reset email. Please contact your administrator." : "Nemoguće slanje e-mail-a za ponovno postavljanje lozinke. Molimo Vas kontaktirajte Vašeg administratora",
Severity: Major
Found in settings/l10n/sr@latin.js and 3 other locations - About 1 day to fix
apps/files_external/l10n/lt_LT.js on lines 1..45
apps/files_external/l10n/sr@latin.js on lines 1..45
core/l10n/te.js on lines 1..45

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 218.

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

Function updateIcons has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
Open

    updateIcons:function(itemType, fileList){
        var item;
        var $fileList;
        var currentDir;
        if (!fileList && OCA.Files) {
Severity: Minor
Found in core/js/share.js - About 1 day 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

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

OC.L10N.register(
    "settings",
    {
    "Authentication error" : "සත්‍යාපන දෝෂයක්",
    "Create" : "තනන්න",
Severity: Major
Found in settings/l10n/si_LK.js and 3 other locations - About 1 day to fix
apps/files_sharing/l10n/es_AR.js on lines 1..44
lib/l10n/bn_BD.js on lines 1..44
settings/l10n/ta_LK.js on lines 1..44

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 213.

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 4 locations. Consider refactoring.
Open

OC.L10N.register(
    "settings",
    {
    "Authentication error" : "அத்தாட்சிப்படுத்தலில் வழு",
    "Create" : "உருவாக்குக",
Severity: Major
Found in settings/l10n/ta_LK.js and 3 other locations - About 1 day to fix
apps/files_sharing/l10n/es_AR.js on lines 1..44
lib/l10n/bn_BD.js on lines 1..44
settings/l10n/si_LK.js on lines 1..44

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 213.

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 4 locations. Consider refactoring.
Open

OC.L10N.register(
    "lib",
    {
    "Cannot write into \"config\" directory!" : "\"config\" ডিরেক্টরিতে লেখা যায়না!",
    "This can usually be fixed by giving the webserver write access to the config directory" : "সাধারণতঃ ওয়বসার্ভারকে কনফিগ ডিরেক্টরিতে লেখার অধিকার দিয়ে এই সমস্যা সমাধান করা যায়",
Severity: Major
Found in lib/l10n/bn_BD.js and 3 other locations - About 1 day to fix
apps/files_sharing/l10n/es_AR.js on lines 1..44
settings/l10n/si_LK.js on lines 1..44
settings/l10n/ta_LK.js on lines 1..44

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 213.

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 4 locations. Consider refactoring.
Open

OC.L10N.register(
    "files_sharing",
    {
    "Server to server sharing is not enabled on this server" : "Compartir entre servidores no está habilitado en este servidor",
    "Shared with you" : "Compartido contigo",
Severity: Major
Found in apps/files_sharing/l10n/es_AR.js and 3 other locations - About 1 day to fix
lib/l10n/bn_BD.js on lines 1..44
settings/l10n/si_LK.js on lines 1..44
settings/l10n/ta_LK.js on lines 1..44

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 213.

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 Tags.php has 535 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * @author Bernhard Reiter <ockham@raz.or.at>
 * @author derkostka <sebastian.kostka@gmail.com>
 * @author Joas Schilling <coding@schilljs.com>
Severity: Major
Found in lib/private/Tags.php - About 1 day to fix

    Common has 61 functions (exceeds 20 allowed). Consider refactoring.
    Open

    abstract class Common implements Storage, ILockingStorage, IVersionedStorage, IPersistentLockingStorage {
        use LocalTempFileTrait;
    
        protected $cache;
        protected $scanner;
    Severity: Major
    Found in lib/private/Files/Storage/Common.php - About 1 day to fix

      Method __construct has 219 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function __construct(array $urlParams=[]) {
              parent::__construct('settings', $urlParams);
      
              $container = $this->getContainer();
      
      
      Severity: Major
      Found in settings/Application.php - About 1 day to fix

        File Filesystem.php has 530 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        /**
         * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
         * @author Bart Visscher <bartv@thisnet.nl>
         * @author Christopher Schäpers <kondou@ts.unde.re>
        Severity: Major
        Found in lib/private/Files/Filesystem.php - About 1 day to fix

          LazyRoot has 60 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class LazyRoot implements IRootFolder {
              /** @var \Closure */
              private $rootFolderClosure;
          
              /** @var IRootFolder */
          Severity: Major
          Found in lib/private/Files/Node/LazyRoot.php - About 1 day to fix

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

                    _onClickAction: function(event) {
                        var $target = $(event.target);
                        if (!$target.is('a')) {
                            $target = $target.closest('a');
                        }
            Severity: Major
            Found in apps/files/js/fileactionsapplicationselectmenu.js and 1 other location - About 1 day to fix
            apps/files/js/fileactionsmenu.js on lines 63..87

            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 208.

            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" : "Error Incognite",
                "Close" : "Clauder",
            Severity: Major
            Found in apps/files/l10n/ia.js and 1 other location - About 1 day to fix
            settings/l10n/ta.js on lines 1..43

            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 208.

            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(
                "settings",
                {
                "Authentication error" : "அத்தாட்சிப்படுத்தலில் வழு",
                "Create" : "உருவாக்குக",
            Severity: Major
            Found in settings/l10n/ta.js and 1 other location - About 1 day to fix
            apps/files/l10n/ia.js on lines 1..43

            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 208.

            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

                    _onClickAction: function(event) {
                        var $target = $(event.target);
                        if (!$target.is('a')) {
                            $target = $target.closest('a');
                        }
            Severity: Major
            Found in apps/files/js/fileactionsmenu.js and 1 other location - About 1 day to fix
            apps/files/js/fileactionsapplicationselectmenu.js on lines 65..89

            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 208.

            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 sharedialogview.js has 526 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /*
             * Copyright (c) 2015
             *
             * This file is licensed under the Affero General Public License version 3
             * or later.
            Severity: Major
            Found in core/js/sharedialogview.js - About 1 day to fix

              Function fopen has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function fopen($path, $mode) {
                      // check if the file is stored in the array cache, this means that we
                      // copy a file over to the versions folder, in this case we don't want to
                      // decrypt it
                      if ($this->arrayCache->hasKey('encryption_copy_version_' . $path)) {
              Severity: Minor
              Found in lib/private/Files/Storage/Wrapper/Encryption.php - About 1 day 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

              Method put has 210 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private static function put(
                      $itemType,
                      $itemSource,
                      $shareType,
                      $shareWith,
              Severity: Major
              Found in lib/private/Share/Share.php - About 1 day to fix

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

                OC.L10N.register(
                    "settings",
                    {
                    "Couldn't send reset email. Please contact your administrator." : "Die E-Mail zum Zurücksetzen konnte nicht versendet werden. Bitte kontaktiere Deinen Administrator.",
                    "Saved" : "Gespeichert",
                Severity: Major
                Found in settings/l10n/de_AT.js and 1 other location - About 1 day to fix
                lib/l10n/ka_GE.js on lines 1..42

                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 203.

                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(
                    "lib",
                    {
                    "Unknown filetype" : "უცნობი ფაილის ტიპი",
                    "Invalid image" : "არასწორი სურათი",
                Severity: Major
                Found in lib/l10n/ka_GE.js and 1 other location - About 1 day to fix
                settings/l10n/de_AT.js on lines 1..42

                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 203.

                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

                Severity
                Category
                Status
                Source
                Language