gecos-team/gecoscc-ui

View on GitHub

Showing 1,621 of 1,621 total issues

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

    @mock.patch('gecoscc.views.report_permission._')
    def test_11_resports_permissions(self, gettext_method):
        '''
        Test 11: Permissions report 
        '''
Severity: Major
Found in gecoscc/tests.py and 5 other locations - About 7 hrs to fix
gecoscc/tests.py on lines 7015..7034
gecoscc/tests.py on lines 7037..7056
gecoscc/tests.py on lines 7059..7078
gecoscc/tests.py on lines 7168..7187
gecoscc/tests.py on lines 7191..7210

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

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

    @mock.patch('gecoscc.views.report_user._')
    def test_14_resports_user(self, gettext_method):
        '''
        Test 14: User report 
        '''
Severity: Major
Found in gecoscc/tests.py and 5 other locations - About 7 hrs to fix
gecoscc/tests.py on lines 7015..7034
gecoscc/tests.py on lines 7037..7056
gecoscc/tests.py on lines 7059..7078
gecoscc/tests.py on lines 7081..7100
gecoscc/tests.py on lines 7191..7210

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

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

        $.fn.picker = function picker( option ) {
            var args = Array.prototype.slice.call( arguments, 1 );
            var methodReturn;

            var $set = this.each( function() {
Severity: Major
Found in gecoscc/static/js/libs/fuelux.js and 2 other locations - About 7 hrs to fix
gecoscc/static/js/libs/fuelux.js on lines 3649..3668
gecoscc/static/js/libs/fuelux.js on lines 8043..8062

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

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

        $.fn.tree = function tree( option ) {
            var args = Array.prototype.slice.call( arguments, 1 );
            var methodReturn;

            var $set = this.each( function() {
Severity: Major
Found in gecoscc/static/js/libs/fuelux.js and 2 other locations - About 7 hrs to fix
gecoscc/static/js/libs/fuelux.js on lines 8043..8062
gecoscc/static/js/libs/fuelux.js on lines 8319..8338

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

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

        $.fn.scheduler = function scheduler( option ) {
            var args = Array.prototype.slice.call( arguments, 1 );
            var methodReturn;

            var $set = this.each( function() {
Severity: Major
Found in gecoscc/static/js/libs/fuelux.js and 2 other locations - About 7 hrs to fix
gecoscc/static/js/libs/fuelux.js on lines 3649..3668
gecoscc/static/js/libs/fuelux.js on lines 8319..8338

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

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

        $.fn.combobox = function( option ) {
            var args = Array.prototype.slice.call( arguments, 1 );
            var methodReturn;

            var $set = this.each( function() {
Severity: Major
Found in gecoscc/static/js/libs/fuelux.js and 9 other locations - About 7 hrs to fix
gecoscc/static/js/libs/fuelux.js on lines 177..196
gecoscc/static/js/libs/fuelux.js on lines 1331..1350
gecoscc/static/js/libs/fuelux.js on lines 1588..1607
gecoscc/static/js/libs/fuelux.js on lines 1923..1942
gecoscc/static/js/libs/fuelux.js on lines 2136..2155
gecoscc/static/js/libs/fuelux.js on lines 2342..2361
gecoscc/static/js/libs/fuelux.js on lines 2622..2641
gecoscc/static/js/libs/fuelux.js on lines 4171..4190
gecoscc/static/js/libs/fuelux.js on lines 4364..4383

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

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

        $.fn.search = function( option ) {
            var args = Array.prototype.slice.call( arguments, 1 );
            var methodReturn;

            var $set = this.each( function() {
Severity: Major
Found in gecoscc/static/js/libs/fuelux.js and 9 other locations - About 7 hrs to fix
gecoscc/static/js/libs/fuelux.js on lines 177..196
gecoscc/static/js/libs/fuelux.js on lines 524..543
gecoscc/static/js/libs/fuelux.js on lines 1331..1350
gecoscc/static/js/libs/fuelux.js on lines 1588..1607
gecoscc/static/js/libs/fuelux.js on lines 1923..1942
gecoscc/static/js/libs/fuelux.js on lines 2136..2155
gecoscc/static/js/libs/fuelux.js on lines 2622..2641
gecoscc/static/js/libs/fuelux.js on lines 4171..4190
gecoscc/static/js/libs/fuelux.js on lines 4364..4383

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

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

        $.fn.wizard = function( option ) {
            var args = Array.prototype.slice.call( arguments, 1 );
            var methodReturn;

            var $set = this.each( function() {
Severity: Major
Found in gecoscc/static/js/libs/fuelux.js and 9 other locations - About 7 hrs to fix
gecoscc/static/js/libs/fuelux.js on lines 177..196
gecoscc/static/js/libs/fuelux.js on lines 524..543
gecoscc/static/js/libs/fuelux.js on lines 1331..1350
gecoscc/static/js/libs/fuelux.js on lines 1588..1607
gecoscc/static/js/libs/fuelux.js on lines 1923..1942
gecoscc/static/js/libs/fuelux.js on lines 2136..2155
gecoscc/static/js/libs/fuelux.js on lines 2342..2361
gecoscc/static/js/libs/fuelux.js on lines 2622..2641
gecoscc/static/js/libs/fuelux.js on lines 4364..4383

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

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

        $.fn.datepicker = function( option ) {
            var args = Array.prototype.slice.call( arguments, 1 );
            var methodReturn;

            var $set = this.each( function() {
Severity: Major
Found in gecoscc/static/js/libs/fuelux.js and 9 other locations - About 7 hrs to fix
gecoscc/static/js/libs/fuelux.js on lines 177..196
gecoscc/static/js/libs/fuelux.js on lines 524..543
gecoscc/static/js/libs/fuelux.js on lines 1588..1607
gecoscc/static/js/libs/fuelux.js on lines 1923..1942
gecoscc/static/js/libs/fuelux.js on lines 2136..2155
gecoscc/static/js/libs/fuelux.js on lines 2342..2361
gecoscc/static/js/libs/fuelux.js on lines 2622..2641
gecoscc/static/js/libs/fuelux.js on lines 4171..4190
gecoscc/static/js/libs/fuelux.js on lines 4364..4383

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

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

        $.fn.loader = function( option ) {
            var args = Array.prototype.slice.call( arguments, 1 );
            var methodReturn;

            var $set = this.each( function() {
Severity: Major
Found in gecoscc/static/js/libs/fuelux.js and 9 other locations - About 7 hrs to fix
gecoscc/static/js/libs/fuelux.js on lines 177..196
gecoscc/static/js/libs/fuelux.js on lines 524..543
gecoscc/static/js/libs/fuelux.js on lines 1331..1350
gecoscc/static/js/libs/fuelux.js on lines 1923..1942
gecoscc/static/js/libs/fuelux.js on lines 2136..2155
gecoscc/static/js/libs/fuelux.js on lines 2342..2361
gecoscc/static/js/libs/fuelux.js on lines 2622..2641
gecoscc/static/js/libs/fuelux.js on lines 4171..4190
gecoscc/static/js/libs/fuelux.js on lines 4364..4383

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

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

        $.fn.placard = function( option ) {
            var args = Array.prototype.slice.call( arguments, 1 );
            var methodReturn;

            var $set = this.each( function() {
Severity: Major
Found in gecoscc/static/js/libs/fuelux.js and 9 other locations - About 7 hrs to fix
gecoscc/static/js/libs/fuelux.js on lines 177..196
gecoscc/static/js/libs/fuelux.js on lines 524..543
gecoscc/static/js/libs/fuelux.js on lines 1331..1350
gecoscc/static/js/libs/fuelux.js on lines 1588..1607
gecoscc/static/js/libs/fuelux.js on lines 2136..2155
gecoscc/static/js/libs/fuelux.js on lines 2342..2361
gecoscc/static/js/libs/fuelux.js on lines 2622..2641
gecoscc/static/js/libs/fuelux.js on lines 4171..4190
gecoscc/static/js/libs/fuelux.js on lines 4364..4383

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

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

        $.fn.infinitescroll = function( option ) {
            var args = Array.prototype.slice.call( arguments, 1 );
            var methodReturn;

            var $set = this.each( function() {
Severity: Major
Found in gecoscc/static/js/libs/fuelux.js and 9 other locations - About 7 hrs to fix
gecoscc/static/js/libs/fuelux.js on lines 177..196
gecoscc/static/js/libs/fuelux.js on lines 524..543
gecoscc/static/js/libs/fuelux.js on lines 1331..1350
gecoscc/static/js/libs/fuelux.js on lines 1588..1607
gecoscc/static/js/libs/fuelux.js on lines 1923..1942
gecoscc/static/js/libs/fuelux.js on lines 2136..2155
gecoscc/static/js/libs/fuelux.js on lines 2342..2361
gecoscc/static/js/libs/fuelux.js on lines 2622..2641
gecoscc/static/js/libs/fuelux.js on lines 4171..4190

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

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

        $.fn.selectlist = function( option ) {
            var args = Array.prototype.slice.call( arguments, 1 );
            var methodReturn;

            var $set = this.each( function() {
Severity: Major
Found in gecoscc/static/js/libs/fuelux.js and 9 other locations - About 7 hrs to fix
gecoscc/static/js/libs/fuelux.js on lines 177..196
gecoscc/static/js/libs/fuelux.js on lines 524..543
gecoscc/static/js/libs/fuelux.js on lines 1331..1350
gecoscc/static/js/libs/fuelux.js on lines 1588..1607
gecoscc/static/js/libs/fuelux.js on lines 1923..1942
gecoscc/static/js/libs/fuelux.js on lines 2136..2155
gecoscc/static/js/libs/fuelux.js on lines 2342..2361
gecoscc/static/js/libs/fuelux.js on lines 4171..4190
gecoscc/static/js/libs/fuelux.js on lines 4364..4383

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

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

        $.fn.checkbox = function( option ) {
            var args = Array.prototype.slice.call( arguments, 1 );
            var methodReturn;

            var $set = this.each( function() {
Severity: Major
Found in gecoscc/static/js/libs/fuelux.js and 9 other locations - About 7 hrs to fix
gecoscc/static/js/libs/fuelux.js on lines 524..543
gecoscc/static/js/libs/fuelux.js on lines 1331..1350
gecoscc/static/js/libs/fuelux.js on lines 1588..1607
gecoscc/static/js/libs/fuelux.js on lines 1923..1942
gecoscc/static/js/libs/fuelux.js on lines 2136..2155
gecoscc/static/js/libs/fuelux.js on lines 2342..2361
gecoscc/static/js/libs/fuelux.js on lines 2622..2641
gecoscc/static/js/libs/fuelux.js on lines 4171..4190
gecoscc/static/js/libs/fuelux.js on lines 4364..4383

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

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

        $.fn.radio = function( option ) {
            var args = Array.prototype.slice.call( arguments, 1 );
            var methodReturn;

            var $set = this.each( function() {
Severity: Major
Found in gecoscc/static/js/libs/fuelux.js and 9 other locations - About 7 hrs to fix
gecoscc/static/js/libs/fuelux.js on lines 177..196
gecoscc/static/js/libs/fuelux.js on lines 524..543
gecoscc/static/js/libs/fuelux.js on lines 1331..1350
gecoscc/static/js/libs/fuelux.js on lines 1588..1607
gecoscc/static/js/libs/fuelux.js on lines 1923..1942
gecoscc/static/js/libs/fuelux.js on lines 2342..2361
gecoscc/static/js/libs/fuelux.js on lines 2622..2641
gecoscc/static/js/libs/fuelux.js on lines 4171..4190
gecoscc/static/js/libs/fuelux.js on lines 4364..4383

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

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 remove_chef_user_data has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
Open

def remove_chef_user_data(user, computers, api, policy_fields=None):
    '''
    Remove computer policies in chef node
    '''
    settings = get_current_registry().settings
Severity: Minor
Found in gecoscc/utils.py - About 7 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 apply_change_in_inheritance has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
Open

def apply_change_in_inheritance(logger, db, action, obj, policy, node, inheritanceTree):
    """Function that looks for the node that received the change (obj) inside the inheritance tree
       and performs the change in its policies.

    Args:
Severity: Minor
Found in gecoscc/utils.py - About 7 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

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

        if not self.options.noinput:
            password = None
            for _n in range(3):
                print("Insert the new password, the spaces will be stripped")
                password_1 = getpass("password [1]: ").strip()
Severity: Major
Found in gecoscc/commands/change_password.py and 1 other location - About 7 hrs to fix
gecoscc/commands/create_adminuser.py on lines 70..88

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

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

        if not self.options.noinput:
            password = None
            for _n in range(3):
                print("Insert the new password, the spaces will be stripped")
                password_1 = getpass("password [1]: ").strip()
Severity: Major
Found in gecoscc/commands/create_adminuser.py and 1 other location - About 7 hrs to fix
gecoscc/commands/change_password.py on lines 54..72

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

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

/*jslint browser: true, nomen: true, unparam: true */
/*global App, gettext, GecosUtils */

/*
* Copyright 2013, Junta de Andalucia
Severity: Minor
Found in gecoscc/static/js/tree-views.js - About 7 hrs to fix
    Severity
    Category
    Status
    Source
    Language