linagora/openpaas-esn

View on GitHub
frontend/js/modules/box-overlay/box-overlay.spec.js

Summary

Maintainability
D
2 days
Test Coverage

File box-overlay.spec.js has 460 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use strict';

/* global chai: false, sinon: false */

var expect = chai.expect;
Severity: Minor
Found in frontend/js/modules/box-overlay/box-overlay.spec.js - About 7 hrs to fix

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

        it('should set the "minimized" CSS class when the box is minimized', function() {
          compileAndClickTheButton('<button box-overlay />');
          minimizeFirstBox();
    
          expect(overlays().first().hasClass('minimized')).to.equal(true);
    Severity: Major
    Found in frontend/js/modules/box-overlay/box-overlay.spec.js and 1 other location - About 3 hrs to fix
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 226..232

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

    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

        it('should set the "maximized" CSS class when the box is maximized', function() {
          compileAndClickTheButton('<button box-overlay />');
          maximizeFirstBox();
    
          expect(overlays().first().hasClass('maximized')).to.equal(true);
    Severity: Major
    Found in frontend/js/modules/box-overlay/box-overlay.spec.js and 1 other location - About 3 hrs to fix
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 234..240

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

    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

        beforeEach(inject(function(_$compile_, _$rootScope_, _boxOverlayOpener_) {
          $compile = _$compile_;
          $rootScope = _$rootScope_;
          $scope = $rootScope.$new();
          boxOverlayOpener = _boxOverlayOpener_;
    Severity: Minor
    Found in frontend/js/modules/box-overlay/box-overlay.spec.js and 1 other location - About 55 mins to fix
    frontend/js/modules/form-helper/filter-input/filter-input.component.spec.js on lines 33..38

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

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

        it('should be closeable when no closeable=true is given', function() {
          compileAndClickTheButton('<button box-overlay box-closeable="true" />');
    
          expect(angular.element('.box-overlay-open i.close')).to.have.length(1);
        });
    Severity: Major
    Found in frontend/js/modules/box-overlay/box-overlay.spec.js and 7 other locations - About 50 mins to fix
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 253..257
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 259..263
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 271..275
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 284..288
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 290..294
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 296..300
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 302..306

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

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

        it('should be closeable when no closeable option is given', function() {
          compileAndClickTheButton('<button box-overlay />');
    
          expect(angular.element('.box-overlay-open i.close')).to.have.length(1);
        });
    Severity: Major
    Found in frontend/js/modules/box-overlay/box-overlay.spec.js and 7 other locations - About 50 mins to fix
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 253..257
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 259..263
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 265..269
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 284..288
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 290..294
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 296..300
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 302..306

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

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

        it('should open in the given initial state when defined', function() {
          compileAndClickTheButton('<button box-overlay box-initial-state="FULL_SCREEN" />');
    
          expect(angular.element('.full-screen')).to.have.length(1);
        });
    Severity: Major
    Found in frontend/js/modules/box-overlay/box-overlay.spec.js and 7 other locations - About 50 mins to fix
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 259..263
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 265..269
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 271..275
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 284..288
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 290..294
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 296..300
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 302..306

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

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

        it('should have maximize button when allowedStates contains MAXIMIZED', function() {
          compileAndClickTheButton('<button box-overlay box-allowed-states="[\'MAXIMIZED\']"/>');
    
          expect(angular.element('.box-overlay-open .toggle-maximize')).to.have.length(1);
        });
    Severity: Major
    Found in frontend/js/modules/box-overlay/box-overlay.spec.js and 7 other locations - About 50 mins to fix
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 253..257
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 259..263
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 265..269
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 271..275
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 290..294
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 296..300
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 302..306

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

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

        it('should have minimize button when allowedStates contains MINIMIZED', function() {
          compileAndClickTheButton('<button box-overlay box-allowed-states="[\'MINIMIZED\']"/>');
    
          expect(angular.element('.box-overlay-open .toggle-minimize')).to.have.length(1);
        });
    Severity: Major
    Found in frontend/js/modules/box-overlay/box-overlay.spec.js and 7 other locations - About 50 mins to fix
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 253..257
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 259..263
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 265..269
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 271..275
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 284..288
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 290..294
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 302..306

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

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

        it('should not be closeable when closeable=false is given', function() {
          compileAndClickTheButton('<button box-overlay box-closeable="false" />');
    
          expect(angular.element('.box-overlay-open i.close')).to.have.length(0);
        });
    Severity: Major
    Found in frontend/js/modules/box-overlay/box-overlay.spec.js and 7 other locations - About 50 mins to fix
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 253..257
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 265..269
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 271..275
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 284..288
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 290..294
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 296..300
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 302..306

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

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

        it('should not have maximize button when allowedStates does not contain MAXIMIZED', function() {
          compileAndClickTheButton('<button box-overlay box-allowed-states="[\'MINIMIZED\']"/>');
    
          expect(angular.element('.box-overlay-open .toggle-maximize')).to.have.length(0);
        });
    Severity: Major
    Found in frontend/js/modules/box-overlay/box-overlay.spec.js and 7 other locations - About 50 mins to fix
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 253..257
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 259..263
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 265..269
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 271..275
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 284..288
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 290..294
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 296..300

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

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

        it('should not have minimize button when allowedStates does not contain MINIMIZED', function() {
          compileAndClickTheButton('<button box-overlay box-allowed-states="[\'MAXIMIZED\']"/>');
    
          expect(angular.element('.box-overlay-open .toggle-minimize')).to.have.length(0);
        });
    Severity: Major
    Found in frontend/js/modules/box-overlay/box-overlay.spec.js and 7 other locations - About 50 mins to fix
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 253..257
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 259..263
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 265..269
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 271..275
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 284..288
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 296..300
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 302..306

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

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

        beforeEach(inject(function(_$timeout_, _$httpBackend_, _$boxOverlay_, _$q_) {
          $timeout = _$timeout_;
          $httpBackend = _$httpBackend_;
          $boxOverlay = _$boxOverlay_;
          $q = _$q_;
    Severity: Major
    Found in frontend/js/modules/box-overlay/box-overlay.spec.js and 5 other locations - About 40 mins to fix
    frontend/js/modules/app-state/services/app-state.service.spec.js on lines 13..23
    frontend/js/modules/infinite-list/infinite-list.directive.spec.js on lines 45..50
    frontend/js/modules/shortcuts/shortcuts.service.spec.js on lines 14..19
    frontend/js/modules/user-configuration/user-configuration.service.spec.js on lines 15..20
    modules/linagora.esn.profile/frontend/app/edit/profile-edit.controller.spec.js on lines 170..180

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

    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

          it('should raise event ESN_BOX_OVERLAY_EVENTS.RESIZED when unminimized', function() {
            minimizeFirstBox();
            maximizeFirstBox();
    
            expect(mock).to.have.been.calledOnce;
    Severity: Minor
    Found in frontend/js/modules/box-overlay/box-overlay.spec.js and 1 other location - About 40 mins to fix
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 341..346

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

    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

          it('should raise event ESN_BOX_OVERLAY_EVENTS.RESIZED when minimized clicked 2 times', function() {
            minimizeFirstBox();
            minimizeFirstBox();
    
            expect(mock).to.have.been.calledOnce;
    Severity: Minor
    Found in frontend/js/modules/box-overlay/box-overlay.spec.js and 1 other location - About 40 mins to fix
    frontend/js/modules/box-overlay/box-overlay.spec.js on lines 322..327

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

    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

        beforeEach(inject(function(_$compile_, _$rootScope_) {
          $compile = _$compile_;
          $rootScope = _$rootScope_;
          $scope = $rootScope.$new();
        }));
    Severity: Minor
    Found in frontend/js/modules/box-overlay/box-overlay.spec.js and 1 other location - About 35 mins to fix
    frontend/js/modules/user-notification/list/item/user-notification-list-item.directive.spec.js on lines 52..59

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

    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

    There are no issues that match your filters.

    Category
    Status