owncloud/core

View on GitHub

Showing 1,269 of 4,504 total issues

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

            td.append($('<span></span>').attr({
                "class": "modified",
                "title": formatted,
                "style": 'color:rgb('+modifiedColor+','+modifiedColor+','+modifiedColor+')'
            }).text(text)
Severity: Major
Found in apps/files/js/filelist.js and 1 other location - About 2 hrs to fix
apps/files_sharing/js/sharedfilelist.js on lines 126..132

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

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

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

                td.append($('<span></span>').attr({
                        "class": "modified",
                        "title": formatted,
                        "style": 'color:rgb(' + modifiedColor + ',' + modifiedColor + ',' + modifiedColor + ')'
                    }).text(text)
Severity: Major
Found in apps/files_sharing/js/sharedfilelist.js and 1 other location - About 2 hrs to fix
apps/files/js/filelist.js on lines 1309..1315

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

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

                    self.addAndFetchFileInfo(targetPath, '', {scrollTo:true}).then(function(status, data) {
                        deferred.resolve(status, data);
                    }, function() {
                        OC.Notification.show(t('files', 'Could not create folder "{dir}"',
                            {dir: name}), {type: 'error'}
Severity: Major
Found in apps/files/js/filelist.js and 1 other location - About 2 hrs to fix
apps/files/js/filelist.js on lines 2537..2543

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

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

                    self.addAndFetchFileInfo(targetPath, '', {scrollTo: true}).then(function(status, data) {
                        deferred.resolve(status, data);
                    }, function() {
                        OC.Notification.show(t('files', 'Could not create file "{file}"',
                            {file: name}), {type: 'error'}
Severity: Major
Found in apps/files/js/filelist.js and 1 other location - About 2 hrs to fix
apps/files/js/filelist.js on lines 2587..2593

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

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

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

    public function getLength() {
        $req = $this->server->httpRequest;
        $length = $req->getHeader('X-Expected-Entity-Length');
        if (!\is_numeric($length)) {
            $length = $req->getHeader('Content-Length');
Severity: Major
Found in apps/dav/lib/Connector/Sabre/QuotaPlugin.php and 1 other location - About 2 hrs to fix
apps/dav/lib/Files/PublicFiles/PublicFilesPlugin.php on lines 279..293

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

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

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

    public function getLength() {
        $req = $this->server->httpRequest;
        $length = $req->getHeader('X-Expected-Entity-Length');
        if (!\is_numeric($length)) {
            $length = $req->getHeader('Content-Length');
Severity: Major
Found in apps/dav/lib/Files/PublicFiles/PublicFilesPlugin.php and 1 other location - About 2 hrs to fix
apps/dav/lib/Connector/Sabre/QuotaPlugin.php on lines 231..245

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

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

    private static function lockFiles($view, $dir, $files) {
        foreach ($files as $file) {
            $filePath = "{$dir}/{$file}";
            $view->lockFile($filePath, ILockingProvider::LOCK_SHARED);
            if ($view->is_dir($filePath)) {
Severity: Major
Found in lib/private/legacy/files.php and 1 other location - About 2 hrs to fix
lib/private/legacy/files.php on lines 366..381

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

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

    private static function unlockFiles($view, $dir, $files) {
        foreach ($files as $file) {
            $filePath = "{$dir}/{$file}";
            $view->unlockFile($filePath, ILockingProvider::LOCK_SHARED);
            if ($view->is_dir($filePath)) {
Severity: Major
Found in lib/private/legacy/files.php and 1 other location - About 2 hrs to fix
lib/private/legacy/files.php on lines 344..359

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

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

OC.L10N.register(
    "files_external",
    {
    "Personal" : "Osobno",
    "Saved" : "Spremljeno",
Severity: Major
Found in apps/files_external/l10n/bs.js and 6 other locations - About 2 hrs to fix
apps/files_external/l10n/zh_HK.js on lines 1..18
apps/files_sharing/l10n/bn_IN.js on lines 1..18
apps/files_sharing/l10n/ka_GE.js on lines 1..18
apps/systemtags/l10n/et_EE.js on lines 1..18
lib/l10n/pa.js on lines 1..18
lib/l10n/ur_PK.js on lines 1..18

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

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

OC.L10N.register(
    "systemtags",
    {
    "Tags" : "Sildid",
    "Tagged files" : "Sildistatud failid",
Severity: Major
Found in apps/systemtags/l10n/et_EE.js and 6 other locations - About 2 hrs to fix
apps/files_external/l10n/bs.js on lines 1..18
apps/files_external/l10n/zh_HK.js on lines 1..18
apps/files_sharing/l10n/bn_IN.js on lines 1..18
apps/files_sharing/l10n/ka_GE.js on lines 1..18
lib/l10n/pa.js on lines 1..18
lib/l10n/ur_PK.js on lines 1..18

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

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

OC.L10N.register(
    "lib",
    {
    "Unknown filetype" : "غیر معرروف قسم کی فائل",
    "Invalid image" : "غلط تصویر",
Severity: Major
Found in lib/l10n/ur_PK.js and 6 other locations - About 2 hrs to fix
apps/files_external/l10n/bs.js on lines 1..18
apps/files_external/l10n/zh_HK.js on lines 1..18
apps/files_sharing/l10n/bn_IN.js on lines 1..18
apps/files_sharing/l10n/ka_GE.js on lines 1..18
apps/systemtags/l10n/et_EE.js on lines 1..18
lib/l10n/pa.js on lines 1..18

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

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

OC.L10N.register(
    "lib",
    {
    "today" : "ਅੱਜ",
    "yesterday" : "ਕੱਲ੍ਹ",
Severity: Major
Found in lib/l10n/pa.js and 6 other locations - About 2 hrs to fix
apps/files_external/l10n/bs.js on lines 1..18
apps/files_external/l10n/zh_HK.js on lines 1..18
apps/files_sharing/l10n/bn_IN.js on lines 1..18
apps/files_sharing/l10n/ka_GE.js on lines 1..18
apps/systemtags/l10n/et_EE.js on lines 1..18
lib/l10n/ur_PK.js on lines 1..18

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

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

OC.L10N.register(
    "files_sharing",
    {
    "Uploading..." : "আপলোডইং ...",
    "Cancel" : "বাতিল করা",
Severity: Major
Found in apps/files_sharing/l10n/bn_IN.js and 6 other locations - About 2 hrs to fix
apps/files_external/l10n/bs.js on lines 1..18
apps/files_external/l10n/zh_HK.js on lines 1..18
apps/files_sharing/l10n/ka_GE.js on lines 1..18
apps/systemtags/l10n/et_EE.js on lines 1..18
lib/l10n/pa.js on lines 1..18
lib/l10n/ur_PK.js on lines 1..18

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

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

OC.L10N.register(
    "files_sharing",
    {
    "Uploading..." : "მიმდინარეობს ატვირთვა...",
    "Cancel" : "უარყოფა",
Severity: Major
Found in apps/files_sharing/l10n/ka_GE.js and 6 other locations - About 2 hrs to fix
apps/files_external/l10n/bs.js on lines 1..18
apps/files_external/l10n/zh_HK.js on lines 1..18
apps/files_sharing/l10n/bn_IN.js on lines 1..18
apps/systemtags/l10n/et_EE.js on lines 1..18
lib/l10n/pa.js on lines 1..18
lib/l10n/ur_PK.js on lines 1..18

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

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

OC.L10N.register(
    "files_external",
    {
    "Personal" : "個人",
    "Saved" : "已儲存",
Severity: Major
Found in apps/files_external/l10n/zh_HK.js and 6 other locations - About 2 hrs to fix
apps/files_external/l10n/bs.js on lines 1..18
apps/files_sharing/l10n/bn_IN.js on lines 1..18
apps/files_sharing/l10n/ka_GE.js on lines 1..18
apps/systemtags/l10n/et_EE.js on lines 1..18
lib/l10n/pa.js on lines 1..18
lib/l10n/ur_PK.js on lines 1..18

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

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 (d2[0].status === 'success') {
                    $.each(d2[0].groups, function(group, displayname) {
                        results.push({name:'g:'+group, displayname:displayname, type:'group'});
                    });
                } else {
Severity: Major
Found in apps/files_external/js/settings.js and 1 other location - About 2 hrs to fix
apps/files_external/js/settings.js on lines 153..159

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

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 (d1[0].status === 'success') {
                    $.each(d1[0].users, function(user, displayname) {
                        results.push({name:'u:'+user, displayname:displayname, type:'user'});
                    });
                } else {
Severity: Major
Found in apps/files_external/js/settings.js and 1 other location - About 2 hrs to fix
apps/files_external/js/settings.js on lines 160..166

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

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

        $(document).on('click', '.app-description-toggle-hide', function () {
            $(this).addClass('hidden');
            $(this).siblings('.app-description-toggle-show').removeClass('hidden');
            $(this).siblings('.app-description-container').slideUp();
        });
Severity: Major
Found in settings/js/admin-apps.js and 1 other location - About 2 hrs to fix
settings/js/admin-apps.js on lines 598..602

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

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

    exports.Apps.showAppSidebar = function($el) {
        var $appSidebar = $el || $('#app-sidebar');
        $appSidebar.removeClass('disappear');
        $('#app-content').addClass('with-app-sidebar').trigger(new $.Event('appresized'));

Severity: Major
Found in core/js/apps.js and 1 other location - About 2 hrs to fix
core/js/apps.js on lines 41..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 82.

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 (ev.action) {
                this._fileList.fileActions.registerAction(ev.action);
            } else if (ev.defaultAction) {
                this._fileList.fileActions.setDefault(
                    ev.defaultAction.mime,
Severity: Major
Found in apps/systemtags/js/app.js and 1 other location - About 2 hrs to fix
apps/files/js/favoritesplugin.js on lines 102..109

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

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