SimenB/stylint

View on GitHub

Showing 85 of 133 total issues

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

            else if ( this.state.conf === 'lowercase_underscore' ) {
                // if no _ present, or - present, or A-Z present
                if ( arr[0].indexOf( '-' ) !== -1 ||
                    arr[0].indexOf( '_' ) === -1 ||
                    upperRe.test( arr[0] ) ) {
Severity: Major
Found in src/checks/namingConvention.js and 1 other location - About 2 hrs to fix
src/checks/namingConvention.js on lines 55..77

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

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( 'false if hash start not found', function() {
            assert.equal( false, hashTest( '$myconst =' ) )
            assert.equal( false, hashTest( 'myconst = @block' ) )
            assert.equal( false, hashTest( '.mistakenUseOfBracket {' ) )
            assert.equal( false, hashTest( 'margin 0' ) )
Severity: Major
Found in test/test.js and 1 other location - About 2 hrs to fix
test/test.js on lines 551..556

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

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( 'false if no bracket found', function() {
            assert.equal( false, bracketsTest( '.class-name' ) )
            assert.equal( false, bracketsTest( '#id' ) )
            assert.equal( false, bracketsTest( 'body.main' ) )
            assert.equal( false, bracketsTest( '+ span' ) )
Severity: Major
Found in test/test.js and 1 other location - About 2 hrs to fix
test/test.js on lines 1191..1196

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    if ( !isValid ) {
        isValid = validJSON.css.some( function( css ) {
            return arr[0] === css || this.checkPrefix( arr[0], css, validJSON )
        }.bind( this ) )
    }
Severity: Major
Found in src/checks/valid.js and 1 other location - About 2 hrs to fix
src/checks/valid.js on lines 62..66

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

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

        it( 'undefined if in keyframes', function() {
            app.state.keyframes = true
            assert.equal( undefined, zeroTest( 'from 0%' ) )
            assert.equal( undefined, zeroTest( '0% {' ) )
            app.state.keyframes = false
Severity: Major
Found in test/test.js and 1 other location - About 2 hrs to fix
test/test.js on lines 2324..2329

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    if ( !isValid ) {
        isValid = validJSON.html.some( function( html ) {
            return arr[0] === html || this.checkPseudo( arr[0], html, validJSON )
        }.bind( this ) )
    }
Severity: Major
Found in src/checks/valid.js and 1 other location - About 2 hrs to fix
src/checks/valid.js on lines 55..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 75.

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

        it( 'undefined if in keyframes', function() {
            app.state.keyframes = true
            assert.equal( undefined, zeroTest( 'from 0%' ) )
            assert.equal( undefined, zeroTest( '0% {' ) )
            app.state.keyframes = false
Severity: Major
Found in test/test.js and 1 other location - About 2 hrs to fix
test/test.js on lines 2377..2382

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

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

        it( 'true if $ is found and is correct', function() {
            assert.ok( varTest( '$my-var = 0' ) )
            assert.ok( varTest( '$first-value = floor( (100% / $columns) * $index )' ) )
            assert.ok( varTest( '$-my-private-var = red' ) )
            assert.ok( varTest( '$_myPrivateVar = red' ) )
Severity: Major
Found in test/test.js and 2 other locations - About 1 hr to fix
test/test.js on lines 1328..1333
test/test.js on lines 1375..1380

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

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

        it( 'true if line has a zero before a decimal point and', function() {
            assert.ok( zeroTest( 'color (0, 0, 0, 0.18)' ) )
            assert.ok( zeroTest( 'color (0,0,0,0.18)' ) )
            assert.ok( zeroTest( 'transform rotate(0.33deg)' ) )
            assert.ok( zeroTest( 'transform rotate( 0.33deg )' ) )
Severity: Major
Found in test/test.js and 2 other locations - About 1 hr to fix
test/test.js on lines 1328..1333
test/test.js on lines 1783..1788

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

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

        it( 'true if line has a zero before a decimal point and not part of range', function() {
            assert.ok( zeroTest( 'color (0, 0, 0, 0.18)' ) )
            assert.ok( zeroTest( 'color (0,0,0,0.18)' ) )
            assert.ok( zeroTest( 'transform rotate(0.33deg)' ) )
            assert.ok( zeroTest( 'transform rotate( 0.33deg )' ) )
Severity: Major
Found in test/test.js and 2 other locations - About 1 hr to fix
test/test.js on lines 1375..1380
test/test.js on lines 1783..1788

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

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( 'return app.parse if passed directory', function() {
            app.getFiles( '/styl' )
            app.getFiles.getCall( 0 ).returned( sinon.match.same( app.parse ) )
        } )
Severity: Major
Found in test/test.js and 1 other location - About 1 hr to fix
test/test.js on lines 414..417

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

        it( 'return app.parse if passed filename', function() {
            app.getFiles( '/styl/test2.styl' )
            app.getFiles.getCall( 1 ).returned( sinon.match.same( app.parse ) )
        } )
Severity: Major
Found in test/test.js and 1 other location - About 1 hr to fix
test/test.js on lines 409..412

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

        it( 'undefined if no semicolon is found', function() {
            assert.equal( undefined, semiTest( 'margin 0 auto' ) )
            assert.equal( undefined, semiTest( '        margin 0 auto' ) )
            assert.equal( undefined, semiTest( '        .class-name' ) )
        } )
Severity: Major
Found in test/test.js and 6 other locations - About 1 hr to fix
test/test.js on lines 708..712
test/test.js on lines 1335..1339
test/test.js on lines 1341..1345
test/test.js on lines 1347..1351
test/test.js on lines 1369..1373
test/test.js on lines 1382..1386

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        it( 'undefined if leading num not zero', function() {
            assert.equal( undefined, zeroTest( 'font-size: 1.1em' ) )
            assert.equal( undefined, zeroTest( 'transform rotate( 22.33deg )' ) )
            assert.equal( undefined, zeroTest( 'width 33.3333333%' ) )
        } )
Severity: Major
Found in test/test.js and 6 other locations - About 1 hr to fix
test/test.js on lines 708..712
test/test.js on lines 1335..1339
test/test.js on lines 1341..1345
test/test.js on lines 1347..1351
test/test.js on lines 1369..1373
test/test.js on lines 1883..1887

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        it( 'undefined if range', function() {
            assert.equal( undefined, zeroTest( 'for 0..9' ) )
            assert.equal( undefined, zeroTest( 'for 0...9' ) )
            assert.equal( undefined, zeroTest( 'for $ in (0..9)' ) )
        } )
Severity: Major
Found in test/test.js and 6 other locations - About 1 hr to fix
test/test.js on lines 708..712
test/test.js on lines 1341..1345
test/test.js on lines 1347..1351
test/test.js on lines 1369..1373
test/test.js on lines 1382..1386
test/test.js on lines 1883..1887

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        it( 'undefined if colon found', function() {
            assert.equal( undefined, colonTest( 'background-image: ' ) )
            assert.equal( undefined, colonTest( 'margin: 0 auto' ) )
            assert.equal( undefined, colonTest( 'margin: 0 auto;' ) )
        } )
Severity: Major
Found in test/test.js and 6 other locations - About 1 hr to fix
test/test.js on lines 1335..1339
test/test.js on lines 1341..1345
test/test.js on lines 1347..1351
test/test.js on lines 1369..1373
test/test.js on lines 1382..1386
test/test.js on lines 1883..1887

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        it( 'undefined if leading num not zero', function() {
            assert.equal( undefined, zeroTest( 'font-size: 1.1em' ) )
            assert.equal( undefined, zeroTest( 'transform rotate( 22.33deg )' ) )
            assert.equal( undefined, zeroTest( 'width 33.3333333%' ) )
        } )
Severity: Major
Found in test/test.js and 6 other locations - About 1 hr to fix
test/test.js on lines 708..712
test/test.js on lines 1335..1339
test/test.js on lines 1347..1351
test/test.js on lines 1369..1373
test/test.js on lines 1382..1386
test/test.js on lines 1883..1887

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        it( 'undefined if no .\d in line', function() {
            assert.equal( undefined, zeroTest( 'margin auto' ) )
            assert.equal( undefined, zeroTest( '.className' ) )
            assert.equal( undefined, zeroTest( '.class.other-class' ) )
        } )
Severity: Major
Found in test/test.js and 6 other locations - About 1 hr to fix
test/test.js on lines 708..712
test/test.js on lines 1335..1339
test/test.js on lines 1341..1345
test/test.js on lines 1369..1373
test/test.js on lines 1382..1386
test/test.js on lines 1883..1887

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        it( 'false if range', function() {
            assert.equal( undefined, zeroTest( 'for 0..9' ) )
            assert.equal( undefined, zeroTest( 'for 0...9' ) )
            assert.equal( undefined, zeroTest( 'for $ in (0..9)' ) )
        } )
Severity: Major
Found in test/test.js and 6 other locations - About 1 hr to fix
test/test.js on lines 708..712
test/test.js on lines 1335..1339
test/test.js on lines 1341..1345
test/test.js on lines 1347..1351
test/test.js on lines 1382..1386
test/test.js on lines 1883..1887

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

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

        it( 'true if * is found', function() {
            assert.ok( universalTest( '*' ) )
            assert.ok( universalTest( '*:before' ) )
            assert.ok( universalTest( '*::after' ) )
        } )
Severity: Major
Found in test/test.js and 2 other locations - About 1 hr to fix
test/test.js on lines 1656..1660
test/test.js on lines 1662..1666

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language