rofrischmann/bredon

View on GitHub

Showing 459 of 459 total issues

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

  contain: (node, isMultiValue) =>
    validateUnorderedNodeList([
      matchesIdentifier(['size']),
      matchesIdentifier(['layout']),
      matchesIdentifier(['style']),
Severity: Minor
Found in packages/bredon-validate/src/propertyValidators.js and 1 other location - About 50 mins to fix
packages/bredon-validate/src/propertyValidators.js on lines 575..581

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

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('should normalize color values to hsl', () => {
    expect(
      compile('1px solid rgba(100, 100, 200, 0.55)', {
        plugins: [colorPlugin({ format: 'hsl' })],
      })
Severity: Major
Found in packages/bredon-plugin-color/src/__tests__/color-test.js and 2 other locations - About 50 mins to fix
packages/bredon-plugin-color/src/__tests__/color-test.js on lines 22..28
packages/bredon-plugin-color/src/__tests__/color-test.js on lines 30..36

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

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

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

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

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

Refactorings

Further Reading

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

  it('should normalize color values to rgb', () => {
    expect(
      compile('1px solid #FFFFFF', {
        plugins: [colorPlugin({ format: 'rgb' })],
      })
Severity: Major
Found in packages/bredon-plugin-color/src/__tests__/color-test.js and 2 other locations - About 50 mins to fix
packages/bredon-plugin-color/src/__tests__/color-test.js on lines 14..20
packages/bredon-plugin-color/src/__tests__/color-test.js on lines 30..36

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

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

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

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

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

Refactorings

Further Reading

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

  it('should use the provided precision', () => {
    expect(
      compile('calc(10px / 3)', {
        plugins: [calcPlugin({ precision: 6 })],
      })
Severity: Minor
Found in packages/bredon-plugin-calc/src/__tests__/calc-test.js and 1 other location - About 50 mins to fix
packages/bredon-plugin-precision/src/__tests__/precision-test.js on lines 14..24

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

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

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

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

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

Refactorings

Further Reading

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

  it('should normalize named colors to hex', () => {
    expect(
      compile('1px solid red', {
        plugins: [colorPlugin({ format: 'rgb' })],
      })
Severity: Major
Found in packages/bredon-plugin-color/src/__tests__/color-test.js and 2 other locations - About 50 mins to fix
packages/bredon-plugin-color/src/__tests__/color-test.js on lines 14..20
packages/bredon-plugin-color/src/__tests__/color-test.js on lines 22..28

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

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

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

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

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

Refactorings

Further Reading

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

  it('should reduce precision using a custom precision', () => {
    expect(
      compile('2.123456', {
        plugins: [
          precisionPlugin({
packages/bredon-plugin-calc/src/__tests__/calc-test.js on lines 14..20

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

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

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

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

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

Refactorings

Further Reading

Function textShadow has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

  textShadow: (node, isMultiValue) => {
    if (isMultiValue) {
      if (node.length === 2) {
        return validateNodeList(isLength)(node)
      }
Severity: Minor
Found in packages/bredon-validate/src/propertyValidators.js - About 45 mins 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

Avoid deeply nested control flow statements.
Open

            if (!isValidUnit(innerNextToken.value)) {
              throw new SyntaxError(
                `A float (${this.currentToken
                  .value}) must be followed by a valid unit. Instead found "${innerNextToken.value}" of type "${innerNextToken.type}".`
              )
Severity: Major
Found in packages/bredon/src/Parser.js - About 45 mins to fix

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

      margin: (node, isMultiValue) =>
        validateNodeList(
          // margin-left is equivalent to -top, -bottom, -right
          node => validators.marginLeft(node) || matchesKeyword('marginLeft')(node),
          4
    Severity: Minor
    Found in packages/bredon-validate/src/propertyValidators.js and 1 other location - About 45 mins to fix
    packages/bredon-validate/src/propertyValidators.js on lines 520..526

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

    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

      padding: (node, isMultiValue) =>
        validateNodeList(
          // padding-left is equivalent to -top, -bottom, -right
          node =>
            validators.paddingLeft(node) || matchesKeyword('paddingLeft')(node),
    Severity: Minor
    Found in packages/bredon-validate/src/propertyValidators.js and 1 other location - About 45 mins to fix
    packages/bredon-validate/src/propertyValidators.js on lines 457..462

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

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

      it('should correctly parse ie hacks', () => {
        const parser = new Parser()
    
        expect(['100%\\9', parser.parse('100%\\9')]).toMatchSnapshot()
      })
    Severity: Major
    Found in packages/bredon/src/__tests__/Parser-test.js and 8 other locations - About 40 mins to fix
    packages/bredon/src/__tests__/Parser-test.js on lines 27..31
    packages/bredon/src/__tests__/Parser-test.js on lines 33..37
    packages/bredon/src/__tests__/Parser-test.js on lines 39..43
    packages/bredon/src/__tests__/Parser-test.js on lines 45..49
    packages/bredon/src/__tests__/Parser-test.js on lines 51..55
    packages/bredon/src/__tests__/Parser-test.js on lines 57..64
    packages/bredon/src/__tests__/Parser-test.js on lines 107..116
    packages/bredon/src/__tests__/Parser-test.js on lines 118..122

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 48.

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

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

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

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

    Refactorings

    Further Reading

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

      it('should correctly parse algebraic signs', () => {
        const parser = new Parser()
    
        expect(['-400', parser.parse('-400')]).toMatchSnapshot()
      })
    Severity: Major
    Found in packages/bredon/src/__tests__/Parser-test.js and 8 other locations - About 40 mins to fix
    packages/bredon/src/__tests__/Parser-test.js on lines 21..25
    packages/bredon/src/__tests__/Parser-test.js on lines 27..31
    packages/bredon/src/__tests__/Parser-test.js on lines 33..37
    packages/bredon/src/__tests__/Parser-test.js on lines 45..49
    packages/bredon/src/__tests__/Parser-test.js on lines 51..55
    packages/bredon/src/__tests__/Parser-test.js on lines 57..64
    packages/bredon/src/__tests__/Parser-test.js on lines 107..116
    packages/bredon/src/__tests__/Parser-test.js on lines 118..122

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 48.

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

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

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

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

    Refactorings

    Further Reading

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

      it('should correctly parse URLs', () => {
        const parser = new Parser()
    
        expect([
          'url(https://www.google.de/request#something?param=true&foo=bar%20)',
    Severity: Major
    Found in packages/bredon/src/__tests__/Parser-test.js and 8 other locations - About 40 mins to fix
    packages/bredon/src/__tests__/Parser-test.js on lines 21..25
    packages/bredon/src/__tests__/Parser-test.js on lines 27..31
    packages/bredon/src/__tests__/Parser-test.js on lines 33..37
    packages/bredon/src/__tests__/Parser-test.js on lines 39..43
    packages/bredon/src/__tests__/Parser-test.js on lines 45..49
    packages/bredon/src/__tests__/Parser-test.js on lines 51..55
    packages/bredon/src/__tests__/Parser-test.js on lines 57..64
    packages/bredon/src/__tests__/Parser-test.js on lines 118..122

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 48.

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

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

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

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

    Refactorings

    Further Reading

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

      it('should correctly parse !important', () => {
        const parser = new Parser()
    
        expect(['3px !important', parser.parse('3px !important')]).toMatchSnapshot()
      })
    Severity: Major
    Found in packages/bredon/src/__tests__/Parser-test.js and 8 other locations - About 40 mins to fix
    packages/bredon/src/__tests__/Parser-test.js on lines 21..25
    packages/bredon/src/__tests__/Parser-test.js on lines 27..31
    packages/bredon/src/__tests__/Parser-test.js on lines 39..43
    packages/bredon/src/__tests__/Parser-test.js on lines 45..49
    packages/bredon/src/__tests__/Parser-test.js on lines 51..55
    packages/bredon/src/__tests__/Parser-test.js on lines 57..64
    packages/bredon/src/__tests__/Parser-test.js on lines 107..116
    packages/bredon/src/__tests__/Parser-test.js on lines 118..122

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 48.

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

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

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

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

    Refactorings

    Further Reading

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

      it('should correctly parse expressions', () => {
        const parser = new Parser()
    
        expect(['calc(100%+5/2)', parser.parse('calc(100%+5/2)')]).toMatchSnapshot()
      })
    Severity: Major
    Found in packages/bredon/src/__tests__/Parser-test.js and 8 other locations - About 40 mins to fix
    packages/bredon/src/__tests__/Parser-test.js on lines 21..25
    packages/bredon/src/__tests__/Parser-test.js on lines 27..31
    packages/bredon/src/__tests__/Parser-test.js on lines 33..37
    packages/bredon/src/__tests__/Parser-test.js on lines 39..43
    packages/bredon/src/__tests__/Parser-test.js on lines 45..49
    packages/bredon/src/__tests__/Parser-test.js on lines 51..55
    packages/bredon/src/__tests__/Parser-test.js on lines 57..64
    packages/bredon/src/__tests__/Parser-test.js on lines 107..116

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 48.

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

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

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

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

    Refactorings

    Further Reading

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

      it('should correctly parse HexColors', () => {
        const parser = new Parser()
    
        expect(['#66FF66', parser.parse('#66FF66')]).toMatchSnapshot()
      })
    Severity: Major
    Found in packages/bredon/src/__tests__/Parser-test.js and 8 other locations - About 40 mins to fix
    packages/bredon/src/__tests__/Parser-test.js on lines 21..25
    packages/bredon/src/__tests__/Parser-test.js on lines 27..31
    packages/bredon/src/__tests__/Parser-test.js on lines 33..37
    packages/bredon/src/__tests__/Parser-test.js on lines 39..43
    packages/bredon/src/__tests__/Parser-test.js on lines 45..49
    packages/bredon/src/__tests__/Parser-test.js on lines 57..64
    packages/bredon/src/__tests__/Parser-test.js on lines 107..116
    packages/bredon/src/__tests__/Parser-test.js on lines 118..122

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 48.

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

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

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

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

    Refactorings

    Further Reading

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

      it('should correctly parse integers', () => {
        const parser = new Parser()
    
        expect(['400', parser.parse('400')]).toMatchSnapshot()
      })
    Severity: Major
    Found in packages/bredon/src/__tests__/Parser-test.js and 8 other locations - About 40 mins to fix
    packages/bredon/src/__tests__/Parser-test.js on lines 21..25
    packages/bredon/src/__tests__/Parser-test.js on lines 33..37
    packages/bredon/src/__tests__/Parser-test.js on lines 39..43
    packages/bredon/src/__tests__/Parser-test.js on lines 45..49
    packages/bredon/src/__tests__/Parser-test.js on lines 51..55
    packages/bredon/src/__tests__/Parser-test.js on lines 57..64
    packages/bredon/src/__tests__/Parser-test.js on lines 107..116
    packages/bredon/src/__tests__/Parser-test.js on lines 118..122

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 48.

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

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

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

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

    Refactorings

    Further Reading

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

      it('should correctly parse strings', () => {
        const parser = new Parser()
    
        expect([
          '"hello, it\'s me."',
    Severity: Major
    Found in packages/bredon/src/__tests__/Parser-test.js and 8 other locations - About 40 mins to fix
    packages/bredon/src/__tests__/Parser-test.js on lines 21..25
    packages/bredon/src/__tests__/Parser-test.js on lines 27..31
    packages/bredon/src/__tests__/Parser-test.js on lines 33..37
    packages/bredon/src/__tests__/Parser-test.js on lines 39..43
    packages/bredon/src/__tests__/Parser-test.js on lines 45..49
    packages/bredon/src/__tests__/Parser-test.js on lines 51..55
    packages/bredon/src/__tests__/Parser-test.js on lines 107..116
    packages/bredon/src/__tests__/Parser-test.js on lines 118..122

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 48.

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

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

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

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

    Refactorings

    Further Reading

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

      it('should correctly parse parentheses', () => {
        const parser = new Parser()
    
        expect(['(', parser.parse('(')]).toMatchSnapshot()
      })
    Severity: Major
    Found in packages/bredon/src/__tests__/Parser-test.js and 8 other locations - About 40 mins to fix
    packages/bredon/src/__tests__/Parser-test.js on lines 21..25
    packages/bredon/src/__tests__/Parser-test.js on lines 27..31
    packages/bredon/src/__tests__/Parser-test.js on lines 33..37
    packages/bredon/src/__tests__/Parser-test.js on lines 39..43
    packages/bredon/src/__tests__/Parser-test.js on lines 51..55
    packages/bredon/src/__tests__/Parser-test.js on lines 57..64
    packages/bredon/src/__tests__/Parser-test.js on lines 107..116
    packages/bredon/src/__tests__/Parser-test.js on lines 118..122

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 48.

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

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

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

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

    Refactorings

    Further Reading

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

      FunctionExpression: (node, generate) =>
        `${node.callee}(${node.params.map(generate).join(',')})`,
    Severity: Minor
    Found in packages/bredon-minify/src/index.js and 1 other location - About 35 mins to fix
    packages/bredon/src/__tests__/Generator-test.js on lines 126..127

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

    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