wikimedia/mediawiki-extensions-WikiLove

View on GitHub

Showing 81 of 81 total issues

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

                designers: {
                    fields: [ 'message' ],
                    option: mw.msg( 'wikilove-barnstar-designers-option' ),
                    descr: mw.msg( 'wikilove-barnstar-designers-desc' ),
                    header: mw.msg( 'wikilove-barnstar-header' ),
Severity: Major
Found in resources/ext.wikiLove.startup/defaultOptions.js and 24 other locations - About 1 hr to fix
resources/ext.wikiLove.startup/defaultOptions.js on lines 32..39
resources/ext.wikiLove.startup/defaultOptions.js on lines 40..47
resources/ext.wikiLove.startup/defaultOptions.js on lines 48..55
resources/ext.wikiLove.startup/defaultOptions.js on lines 56..63
resources/ext.wikiLove.startup/defaultOptions.js on lines 64..71
resources/ext.wikiLove.startup/defaultOptions.js on lines 72..79
resources/ext.wikiLove.startup/defaultOptions.js on lines 80..87
resources/ext.wikiLove.startup/defaultOptions.js on lines 88..95
resources/ext.wikiLove.startup/defaultOptions.js on lines 96..103
resources/ext.wikiLove.startup/defaultOptions.js on lines 104..111
resources/ext.wikiLove.startup/defaultOptions.js on lines 112..119
resources/ext.wikiLove.startup/defaultOptions.js on lines 137..144
resources/ext.wikiLove.startup/defaultOptions.js on lines 145..152
resources/ext.wikiLove.startup/defaultOptions.js on lines 153..160
resources/ext.wikiLove.startup/defaultOptions.js on lines 161..168
resources/ext.wikiLove.startup/defaultOptions.js on lines 169..176
resources/ext.wikiLove.startup/defaultOptions.js on lines 177..184
resources/ext.wikiLove.startup/defaultOptions.js on lines 185..192
resources/ext.wikiLove.startup/defaultOptions.js on lines 193..200
resources/ext.wikiLove.startup/defaultOptions.js on lines 201..208
resources/ext.wikiLove.startup/defaultOptions.js on lines 209..216
resources/ext.wikiLove.startup/defaultOptions.js on lines 217..224
resources/ext.wikiLove.startup/defaultOptions.js on lines 225..232
resources/ext.wikiLove.startup/defaultOptions.js on lines 233..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 70.

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

                diplomacy: {
                    fields: [ 'message' ],
                    option: mw.msg( 'wikilove-barnstar-diplomacy-option' ),
                    descr: mw.msg( 'wikilove-barnstar-diplomacy-desc' ),
                    header: mw.msg( 'wikilove-barnstar-header' ),
Severity: Major
Found in resources/ext.wikiLove.startup/defaultOptions.js and 24 other locations - About 1 hr to fix
resources/ext.wikiLove.startup/defaultOptions.js on lines 32..39
resources/ext.wikiLove.startup/defaultOptions.js on lines 40..47
resources/ext.wikiLove.startup/defaultOptions.js on lines 48..55
resources/ext.wikiLove.startup/defaultOptions.js on lines 64..71
resources/ext.wikiLove.startup/defaultOptions.js on lines 72..79
resources/ext.wikiLove.startup/defaultOptions.js on lines 80..87
resources/ext.wikiLove.startup/defaultOptions.js on lines 88..95
resources/ext.wikiLove.startup/defaultOptions.js on lines 96..103
resources/ext.wikiLove.startup/defaultOptions.js on lines 104..111
resources/ext.wikiLove.startup/defaultOptions.js on lines 112..119
resources/ext.wikiLove.startup/defaultOptions.js on lines 120..127
resources/ext.wikiLove.startup/defaultOptions.js on lines 137..144
resources/ext.wikiLove.startup/defaultOptions.js on lines 145..152
resources/ext.wikiLove.startup/defaultOptions.js on lines 153..160
resources/ext.wikiLove.startup/defaultOptions.js on lines 161..168
resources/ext.wikiLove.startup/defaultOptions.js on lines 169..176
resources/ext.wikiLove.startup/defaultOptions.js on lines 177..184
resources/ext.wikiLove.startup/defaultOptions.js on lines 185..192
resources/ext.wikiLove.startup/defaultOptions.js on lines 193..200
resources/ext.wikiLove.startup/defaultOptions.js on lines 201..208
resources/ext.wikiLove.startup/defaultOptions.js on lines 209..216
resources/ext.wikiLove.startup/defaultOptions.js on lines 217..224
resources/ext.wikiLove.startup/defaultOptions.js on lines 225..232
resources/ext.wikiLove.startup/defaultOptions.js on lines 233..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 70.

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

                tireless: {
                    fields: [ 'message' ],
                    option: mw.msg( 'wikilove-barnstar-tireless-option' ),
                    descr: mw.msg( 'wikilove-barnstar-tireless-desc' ),
                    header: mw.msg( 'wikilove-barnstar-header' ),
Severity: Major
Found in resources/ext.wikiLove.startup/defaultOptions.js and 24 other locations - About 1 hr to fix
resources/ext.wikiLove.startup/defaultOptions.js on lines 32..39
resources/ext.wikiLove.startup/defaultOptions.js on lines 40..47
resources/ext.wikiLove.startup/defaultOptions.js on lines 48..55
resources/ext.wikiLove.startup/defaultOptions.js on lines 56..63
resources/ext.wikiLove.startup/defaultOptions.js on lines 64..71
resources/ext.wikiLove.startup/defaultOptions.js on lines 72..79
resources/ext.wikiLove.startup/defaultOptions.js on lines 80..87
resources/ext.wikiLove.startup/defaultOptions.js on lines 88..95
resources/ext.wikiLove.startup/defaultOptions.js on lines 96..103
resources/ext.wikiLove.startup/defaultOptions.js on lines 104..111
resources/ext.wikiLove.startup/defaultOptions.js on lines 112..119
resources/ext.wikiLove.startup/defaultOptions.js on lines 120..127
resources/ext.wikiLove.startup/defaultOptions.js on lines 137..144
resources/ext.wikiLove.startup/defaultOptions.js on lines 145..152
resources/ext.wikiLove.startup/defaultOptions.js on lines 153..160
resources/ext.wikiLove.startup/defaultOptions.js on lines 161..168
resources/ext.wikiLove.startup/defaultOptions.js on lines 169..176
resources/ext.wikiLove.startup/defaultOptions.js on lines 177..184
resources/ext.wikiLove.startup/defaultOptions.js on lines 185..192
resources/ext.wikiLove.startup/defaultOptions.js on lines 193..200
resources/ext.wikiLove.startup/defaultOptions.js on lines 201..208
resources/ext.wikiLove.startup/defaultOptions.js on lines 209..216
resources/ext.wikiLove.startup/defaultOptions.js on lines 217..224
resources/ext.wikiLove.startup/defaultOptions.js on lines 233..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 70.

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

                surreal: {
                    fields: [ 'message' ],
                    option: mw.msg( 'wikilove-barnstar-surreal-option' ),
                    descr: mw.msg( 'wikilove-barnstar-surreal-desc' ),
                    header: mw.msg( 'wikilove-barnstar-header' ),
Severity: Major
Found in resources/ext.wikiLove.startup/defaultOptions.js and 24 other locations - About 1 hr to fix
resources/ext.wikiLove.startup/defaultOptions.js on lines 32..39
resources/ext.wikiLove.startup/defaultOptions.js on lines 40..47
resources/ext.wikiLove.startup/defaultOptions.js on lines 48..55
resources/ext.wikiLove.startup/defaultOptions.js on lines 56..63
resources/ext.wikiLove.startup/defaultOptions.js on lines 64..71
resources/ext.wikiLove.startup/defaultOptions.js on lines 72..79
resources/ext.wikiLove.startup/defaultOptions.js on lines 80..87
resources/ext.wikiLove.startup/defaultOptions.js on lines 88..95
resources/ext.wikiLove.startup/defaultOptions.js on lines 96..103
resources/ext.wikiLove.startup/defaultOptions.js on lines 104..111
resources/ext.wikiLove.startup/defaultOptions.js on lines 112..119
resources/ext.wikiLove.startup/defaultOptions.js on lines 120..127
resources/ext.wikiLove.startup/defaultOptions.js on lines 137..144
resources/ext.wikiLove.startup/defaultOptions.js on lines 145..152
resources/ext.wikiLove.startup/defaultOptions.js on lines 153..160
resources/ext.wikiLove.startup/defaultOptions.js on lines 161..168
resources/ext.wikiLove.startup/defaultOptions.js on lines 169..176
resources/ext.wikiLove.startup/defaultOptions.js on lines 177..184
resources/ext.wikiLove.startup/defaultOptions.js on lines 185..192
resources/ext.wikiLove.startup/defaultOptions.js on lines 193..200
resources/ext.wikiLove.startup/defaultOptions.js on lines 209..216
resources/ext.wikiLove.startup/defaultOptions.js on lines 217..224
resources/ext.wikiLove.startup/defaultOptions.js on lines 225..232
resources/ext.wikiLove.startup/defaultOptions.js on lines 233..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 70.

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 updateAllDetails has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    updateAllDetails: function () {
        // use remembered data for fields that can be set by the user
        const currentRememberData = {
            header: ( currentTypeOrSubtype.fields.indexOf( 'header' ) !== -1 ? rememberData.header : '' ),
            title: ( currentTypeOrSubtype.fields.indexOf( 'title' ) !== -1 ? rememberData.title : '' ),
Severity: Minor
Found in resources/ext.wikiLove.startup/wikiLove.js - About 1 hr to fix

    Function updateAllDetails has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
    Open

        updateAllDetails: function () {
            // use remembered data for fields that can be set by the user
            const currentRememberData = {
                header: ( currentTypeOrSubtype.fields.indexOf( 'header' ) !== -1 ? rememberData.header : '' ),
                title: ( currentTypeOrSubtype.fields.indexOf( 'title' ) !== -1 ? rememberData.title : '' ),
    Severity: Minor
    Found in resources/ext.wikiLove.startup/wikiLove.js - About 1 hr 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 showImagePreview has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        showImagePreview: function () {
            let $img;
            const title = $.wikiLove.normalizeFilename( currentTypeOrSubtype.image );
            const loadingType = currentTypeOrSubtype;
            $( '#mw-wikilove-image-preview' ).show();
    Severity: Minor
    Found in resources/ext.wikiLove.startup/wikiLove.js - About 1 hr to fix

      Function clickType has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          clickType: function ( e ) {
              let subtypeId, subtype;
              const newTypeId = $( this ).data( 'typeId' );
      
              e.preventDefault();
      Severity: Minor
      Found in resources/ext.wikiLove.startup/wikiLove.js - About 1 hr to fix

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

                        brownie: {
                            fields: [ 'header', 'message' ],
                            option: mw.msg( 'wikilove-food-brownie-option' ),
                            descr: mw.msg( 'wikilove-food-brownie-desc' ),
                            header: mw.msg( 'wikilove-food-brownie-header' ),
        Severity: Major
        Found in resources/ext.wikiLove.startup/defaultOptions.js and 10 other locations - About 1 hr to fix
        resources/ext.wikiLove.startup/defaultOptions.js on lines 265..272
        resources/ext.wikiLove.startup/defaultOptions.js on lines 281..288
        resources/ext.wikiLove.startup/defaultOptions.js on lines 289..296
        resources/ext.wikiLove.startup/defaultOptions.js on lines 297..304
        resources/ext.wikiLove.startup/defaultOptions.js on lines 305..312
        resources/ext.wikiLove.startup/defaultOptions.js on lines 313..320
        resources/ext.wikiLove.startup/defaultOptions.js on lines 321..328
        resources/ext.wikiLove.startup/defaultOptions.js on lines 329..336
        resources/ext.wikiLove.startup/defaultOptions.js on lines 337..344
        resources/ext.wikiLove.startup/defaultOptions.js on lines 345..352

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

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

                        stroopwafels: {
                            fields: [ 'header', 'message' ],
                            option: mw.msg( 'wikilove-food-stroopwafels-option' ),
                            descr: mw.msg( 'wikilove-food-stroopwafels-desc' ),
                            header: mw.msg( 'wikilove-food-stroopwafels-header' ),
        Severity: Major
        Found in resources/ext.wikiLove.startup/defaultOptions.js and 10 other locations - About 1 hr to fix
        resources/ext.wikiLove.startup/defaultOptions.js on lines 265..272
        resources/ext.wikiLove.startup/defaultOptions.js on lines 273..280
        resources/ext.wikiLove.startup/defaultOptions.js on lines 281..288
        resources/ext.wikiLove.startup/defaultOptions.js on lines 289..296
        resources/ext.wikiLove.startup/defaultOptions.js on lines 297..304
        resources/ext.wikiLove.startup/defaultOptions.js on lines 305..312
        resources/ext.wikiLove.startup/defaultOptions.js on lines 313..320
        resources/ext.wikiLove.startup/defaultOptions.js on lines 321..328
        resources/ext.wikiLove.startup/defaultOptions.js on lines 329..336
        resources/ext.wikiLove.startup/defaultOptions.js on lines 337..344

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

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

                        bubbletea: {
                            fields: [ 'header', 'message' ],
                            option: mw.msg( 'wikilove-food-bubbletea-option' ),
                            descr: mw.msg( 'wikilove-food-bubbletea-desc' ),
                            header: mw.msg( 'wikilove-food-bubbletea-header' ),
        Severity: Major
        Found in resources/ext.wikiLove.startup/defaultOptions.js and 10 other locations - About 1 hr to fix
        resources/ext.wikiLove.startup/defaultOptions.js on lines 265..272
        resources/ext.wikiLove.startup/defaultOptions.js on lines 273..280
        resources/ext.wikiLove.startup/defaultOptions.js on lines 289..296
        resources/ext.wikiLove.startup/defaultOptions.js on lines 297..304
        resources/ext.wikiLove.startup/defaultOptions.js on lines 305..312
        resources/ext.wikiLove.startup/defaultOptions.js on lines 313..320
        resources/ext.wikiLove.startup/defaultOptions.js on lines 321..328
        resources/ext.wikiLove.startup/defaultOptions.js on lines 329..336
        resources/ext.wikiLove.startup/defaultOptions.js on lines 337..344
        resources/ext.wikiLove.startup/defaultOptions.js on lines 345..352

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

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

                        beer: {
                            fields: [ 'header', 'message' ],
                            option: mw.msg( 'wikilove-food-beer-option' ),
                            descr: mw.msg( 'wikilove-food-beer-desc' ),
                            header: mw.msg( 'wikilove-food-beer-header' ),
        Severity: Major
        Found in resources/ext.wikiLove.startup/defaultOptions.js and 10 other locations - About 1 hr to fix
        resources/ext.wikiLove.startup/defaultOptions.js on lines 273..280
        resources/ext.wikiLove.startup/defaultOptions.js on lines 281..288
        resources/ext.wikiLove.startup/defaultOptions.js on lines 289..296
        resources/ext.wikiLove.startup/defaultOptions.js on lines 297..304
        resources/ext.wikiLove.startup/defaultOptions.js on lines 305..312
        resources/ext.wikiLove.startup/defaultOptions.js on lines 313..320
        resources/ext.wikiLove.startup/defaultOptions.js on lines 321..328
        resources/ext.wikiLove.startup/defaultOptions.js on lines 329..336
        resources/ext.wikiLove.startup/defaultOptions.js on lines 337..344
        resources/ext.wikiLove.startup/defaultOptions.js on lines 345..352

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

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

                        coffee: {
                            fields: [ 'header', 'message' ],
                            option: mw.msg( 'wikilove-food-coffee-option' ),
                            descr: mw.msg( 'wikilove-food-coffee-desc' ),
                            header: mw.msg( 'wikilove-food-coffee-header' ),
        Severity: Major
        Found in resources/ext.wikiLove.startup/defaultOptions.js and 10 other locations - About 1 hr to fix
        resources/ext.wikiLove.startup/defaultOptions.js on lines 265..272
        resources/ext.wikiLove.startup/defaultOptions.js on lines 273..280
        resources/ext.wikiLove.startup/defaultOptions.js on lines 281..288
        resources/ext.wikiLove.startup/defaultOptions.js on lines 289..296
        resources/ext.wikiLove.startup/defaultOptions.js on lines 297..304
        resources/ext.wikiLove.startup/defaultOptions.js on lines 313..320
        resources/ext.wikiLove.startup/defaultOptions.js on lines 321..328
        resources/ext.wikiLove.startup/defaultOptions.js on lines 329..336
        resources/ext.wikiLove.startup/defaultOptions.js on lines 337..344
        resources/ext.wikiLove.startup/defaultOptions.js on lines 345..352

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

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

                        cheeseburger: {
                            fields: [ 'header', 'message' ],
                            option: mw.msg( 'wikilove-food-cheeseburger-option' ),
                            descr: mw.msg( 'wikilove-food-cheeseburger-desc' ),
                            header: mw.msg( 'wikilove-food-cheeseburger-header' ),
        Severity: Major
        Found in resources/ext.wikiLove.startup/defaultOptions.js and 10 other locations - About 1 hr to fix
        resources/ext.wikiLove.startup/defaultOptions.js on lines 265..272
        resources/ext.wikiLove.startup/defaultOptions.js on lines 273..280
        resources/ext.wikiLove.startup/defaultOptions.js on lines 281..288
        resources/ext.wikiLove.startup/defaultOptions.js on lines 297..304
        resources/ext.wikiLove.startup/defaultOptions.js on lines 305..312
        resources/ext.wikiLove.startup/defaultOptions.js on lines 313..320
        resources/ext.wikiLove.startup/defaultOptions.js on lines 321..328
        resources/ext.wikiLove.startup/defaultOptions.js on lines 329..336
        resources/ext.wikiLove.startup/defaultOptions.js on lines 337..344
        resources/ext.wikiLove.startup/defaultOptions.js on lines 345..352

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

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

                        pie: {
                            fields: [ 'header', 'message' ],
                            option: mw.msg( 'wikilove-food-pie-option' ),
                            descr: mw.msg( 'wikilove-food-pie-desc' ),
                            header: mw.msg( 'wikilove-food-pie-header' ),
        Severity: Major
        Found in resources/ext.wikiLove.startup/defaultOptions.js and 10 other locations - About 1 hr to fix
        resources/ext.wikiLove.startup/defaultOptions.js on lines 265..272
        resources/ext.wikiLove.startup/defaultOptions.js on lines 273..280
        resources/ext.wikiLove.startup/defaultOptions.js on lines 281..288
        resources/ext.wikiLove.startup/defaultOptions.js on lines 289..296
        resources/ext.wikiLove.startup/defaultOptions.js on lines 297..304
        resources/ext.wikiLove.startup/defaultOptions.js on lines 305..312
        resources/ext.wikiLove.startup/defaultOptions.js on lines 313..320
        resources/ext.wikiLove.startup/defaultOptions.js on lines 321..328
        resources/ext.wikiLove.startup/defaultOptions.js on lines 337..344
        resources/ext.wikiLove.startup/defaultOptions.js on lines 345..352

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

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

                        cupcake: {
                            fields: [ 'header', 'message' ],
                            option: mw.msg( 'wikilove-food-cupcake-option' ),
                            descr: mw.msg( 'wikilove-food-cupcake-desc' ),
                            header: mw.msg( 'wikilove-food-cupcake-header' ),
        Severity: Major
        Found in resources/ext.wikiLove.startup/defaultOptions.js and 10 other locations - About 1 hr to fix
        resources/ext.wikiLove.startup/defaultOptions.js on lines 265..272
        resources/ext.wikiLove.startup/defaultOptions.js on lines 273..280
        resources/ext.wikiLove.startup/defaultOptions.js on lines 281..288
        resources/ext.wikiLove.startup/defaultOptions.js on lines 289..296
        resources/ext.wikiLove.startup/defaultOptions.js on lines 297..304
        resources/ext.wikiLove.startup/defaultOptions.js on lines 305..312
        resources/ext.wikiLove.startup/defaultOptions.js on lines 313..320
        resources/ext.wikiLove.startup/defaultOptions.js on lines 329..336
        resources/ext.wikiLove.startup/defaultOptions.js on lines 337..344
        resources/ext.wikiLove.startup/defaultOptions.js on lines 345..352

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

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

                        tea: {
                            fields: [ 'header', 'message' ],
                            option: mw.msg( 'wikilove-food-tea-option' ),
                            descr: mw.msg( 'wikilove-food-tea-desc' ),
                            header: mw.msg( 'wikilove-food-tea-header' ),
        Severity: Major
        Found in resources/ext.wikiLove.startup/defaultOptions.js and 10 other locations - About 1 hr to fix
        resources/ext.wikiLove.startup/defaultOptions.js on lines 265..272
        resources/ext.wikiLove.startup/defaultOptions.js on lines 273..280
        resources/ext.wikiLove.startup/defaultOptions.js on lines 281..288
        resources/ext.wikiLove.startup/defaultOptions.js on lines 289..296
        resources/ext.wikiLove.startup/defaultOptions.js on lines 297..304
        resources/ext.wikiLove.startup/defaultOptions.js on lines 305..312
        resources/ext.wikiLove.startup/defaultOptions.js on lines 321..328
        resources/ext.wikiLove.startup/defaultOptions.js on lines 329..336
        resources/ext.wikiLove.startup/defaultOptions.js on lines 337..344
        resources/ext.wikiLove.startup/defaultOptions.js on lines 345..352

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

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

                        strawberries: {
                            fields: [ 'header', 'message' ],
                            option: mw.msg( 'wikilove-food-strawberries-option' ),
                            descr: mw.msg( 'wikilove-food-strawberries-desc' ),
                            header: mw.msg( 'wikilove-food-strawberries-header' ),
        Severity: Major
        Found in resources/ext.wikiLove.startup/defaultOptions.js and 10 other locations - About 1 hr to fix
        resources/ext.wikiLove.startup/defaultOptions.js on lines 265..272
        resources/ext.wikiLove.startup/defaultOptions.js on lines 273..280
        resources/ext.wikiLove.startup/defaultOptions.js on lines 281..288
        resources/ext.wikiLove.startup/defaultOptions.js on lines 289..296
        resources/ext.wikiLove.startup/defaultOptions.js on lines 297..304
        resources/ext.wikiLove.startup/defaultOptions.js on lines 305..312
        resources/ext.wikiLove.startup/defaultOptions.js on lines 313..320
        resources/ext.wikiLove.startup/defaultOptions.js on lines 321..328
        resources/ext.wikiLove.startup/defaultOptions.js on lines 329..336
        resources/ext.wikiLove.startup/defaultOptions.js on lines 345..352

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

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

                        cookie: {
                            fields: [ 'header', 'message' ],
                            option: mw.msg( 'wikilove-food-cookie-option' ),
                            descr: mw.msg( 'wikilove-food-cookie-desc' ),
                            header: mw.msg( 'wikilove-food-cookie-header' ),
        Severity: Major
        Found in resources/ext.wikiLove.startup/defaultOptions.js and 10 other locations - About 1 hr to fix
        resources/ext.wikiLove.startup/defaultOptions.js on lines 265..272
        resources/ext.wikiLove.startup/defaultOptions.js on lines 273..280
        resources/ext.wikiLove.startup/defaultOptions.js on lines 281..288
        resources/ext.wikiLove.startup/defaultOptions.js on lines 289..296
        resources/ext.wikiLove.startup/defaultOptions.js on lines 305..312
        resources/ext.wikiLove.startup/defaultOptions.js on lines 313..320
        resources/ext.wikiLove.startup/defaultOptions.js on lines 321..328
        resources/ext.wikiLove.startup/defaultOptions.js on lines 329..336
        resources/ext.wikiLove.startup/defaultOptions.js on lines 337..344
        resources/ext.wikiLove.startup/defaultOptions.js on lines 345..352

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

        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 exports has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        module.exports = function ( grunt ) {
            grunt.loadNpmTasks( 'grunt-eslint' );
            grunt.loadNpmTasks( 'grunt-banana-checker' );
            grunt.loadNpmTasks( 'grunt-stylelint' );
        
        
        Severity: Minor
        Found in Gruntfile.js - About 1 hr to fix
          Severity
          Category
          Status
          Source
          Language