rofrischmann/bredon

View on GitHub

Showing 459 of 459 total issues

File __mdnData.js has 5370 lines of code (exceeds 250 allowed). Consider refactoring.
Open

export default {
  '-ms-overflow-style': {
    syntax: 'auto | none | scrollbar | -ms-autohiding-scrollbar',
    media: 'interactive',
    inherited: true,
Severity: Major
Found in packages/bredon-validate/src/data/__mdnData.js - About 2 wks to fix

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

    export default {
      msOverflowStyle: 'auto',
      MozBinding: 'none',
      MozBorderBottomColors: 'none',
      MozBorderLeftColors: 'none',
    Severity: Major
    Found in packages/bredon-validate/src/data/valueInitials.js and 1 other location - About 1 wk to fix
    packages/bredon-plugin-initial/src/valueInitials.js on lines 1..328

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

    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

    export default {
      msOverflowStyle: 'auto',
      MozBinding: 'none',
      MozBorderBottomColors: 'none',
      MozBorderLeftColors: 'none',
    Severity: Major
    Found in packages/bredon-plugin-initial/src/valueInitials.js and 1 other location - About 1 wk to fix
    packages/bredon-validate/src/data/valueInitials.js on lines 1..328

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

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

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

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

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

    Refactorings

    Further Reading

    File valueKeywords.js has 1118 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    export default {
      MozAppearance: [
        'none',
        'button',
        'button-arrow-down',
    Severity: Major
    Found in packages/bredon-validate/src/data/valueKeywords.js - About 2 days to fix

      validators has 93 functions (exceeds 20 allowed). Consider refactoring.
      Open

      const validators = {
        MozBinding: isURL,
        MozBorderBottomColors: (node, isMultiValue) =>
          validateNodeList(isColor)(normalizeNodeList(node, isMultiValue)),
        MozBorderLeftColors: (node, isMultiValue) =>
      Severity: Major
      Found in packages/bredon-validate/src/propertyValidators.js - About 1 day to fix

        File propertyValidators.js has 715 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import {
          isInteger,
          isStringLiteral,
          isURL,
          isIdentifier,
        Severity: Major
        Found in packages/bredon-validate/src/propertyValidators.js - About 1 day to fix

          File Parser.js has 430 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /* @flow */
          import tokenize from 'tokenize-sync'
          import {
            assignment,
            dimension,
          Severity: Minor
          Found in packages/bredon/src/Parser.js - About 6 hrs to fix

            Function parseIdentifier has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
            Open

              parseIdentifier(partial: string = ''): SimpleNode | FunctionNode {
                if (this.currentToken.type === 'identifier') {
                  let nextToken = this.getNextToken(1)
            
                  let ident = partial + this.currentToken.value
            Severity: Minor
            Found in packages/bredon/src/Parser.js - About 5 hrs to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            File properties.js has 383 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            export default {
              MozAppearance: true,
              MozBackgroundClip: true,
              MozBinding: true,
              MozBorderBottomColors: true,
            Severity: Minor
            Found in packages/bredon-validate/src/data/properties.js - About 5 hrs to fix

              Consider simplifying this complex logical expression.
              Open

                if (isMultiValue) {
                  return (
                    (node.length === 2 &&
                      (((isLengthPercentage(node[0]) ||
                        matchesIdentifier(['left', 'center', 'right'])(node[0])) &&
              Severity: Critical
              Found in packages/bredon-validate/src/types/isPosition.js - About 5 hrs to fix

                File valueInitials.js has 328 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                export default {
                  msOverflowStyle: 'auto',
                  MozBinding: 'none',
                  MozBorderBottomColors: 'none',
                  MozBorderLeftColors: 'none',
                Severity: Minor
                Found in packages/bredon-validate/src/data/valueInitials.js - About 3 hrs to fix

                  File valueInitials.js has 328 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  export default {
                    msOverflowStyle: 'auto',
                    MozBinding: 'none',
                    MozBorderBottomColors: 'none',
                    MozBorderLeftColors: 'none',
                  Severity: Minor
                  Found in packages/bredon-plugin-initial/src/valueInitials.js - About 3 hrs to fix

                    Function isValidProperty has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                    Open

                    export default function isValidProperty(
                      property: string,
                      ast: any,
                      isList?: boolean = false
                    ): boolean {
                    Severity: Minor
                    Found in packages/bredon-validate/src/isValidProperty.js - About 2 hrs to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

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

                      backgroundPositionX: (node, isMultiValue) => {
                        if (isMultiValue) {
                          return (
                            node.length === 2 &&
                            matchesIdentifier(['left', 'right', 'x-start', 'x-end'])(node[0]) &&
                    Severity: Major
                    Found in packages/bredon-validate/src/propertyValidators.js and 1 other location - About 2 hrs to fix
                    packages/bredon-validate/src/propertyValidators.js on lines 158..172

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

                    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

                      backgroundPositionY: (node, isMultiValue) => {
                        if (isMultiValue) {
                          return (
                            node.length === 2 &&
                            matchesIdentifier(['top', 'bottom', 'y-start', 'y-end'])(node[0]) &&
                    Severity: Major
                    Found in packages/bredon-validate/src/propertyValidators.js and 1 other location - About 2 hrs to fix
                    packages/bredon-validate/src/propertyValidators.js on lines 143..157

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

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

                      parseOperator(): SimpleNode {
                        if (this.currentToken.type === 'operator') {
                          if (this.scope === 'expression') {
                            return operator(this.currentToken.value)
                          }
                    Severity: Minor
                    Found in packages/bredon/src/Parser.js - About 2 hrs to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

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

                      'border-color': {
                        syntax: '<color>{1,4}',
                        media: 'visual',
                        inherited: false,
                        animationType: [
                    Severity: Major
                    Found in packages/bredon-validate/src/data/__mdnData.js and 2 other locations - About 2 hrs to fix
                    packages/bredon-validate/src/data/__mdnData.js on lines 1633..1661
                    packages/bredon-validate/src/data/__mdnData.js on lines 1847..1875

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

                    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

                      'border-radius': {
                        syntax: '<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?',
                        media: 'visual',
                        inherited: false,
                        animationType: [
                    Severity: Major
                    Found in packages/bredon-validate/src/data/__mdnData.js and 2 other locations - About 2 hrs to fix
                    packages/bredon-validate/src/data/__mdnData.js on lines 1343..1371
                    packages/bredon-validate/src/data/__mdnData.js on lines 1847..1875

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

                    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

                      'border-width': {
                        syntax: '<br-width>{1,4}',
                        media: 'visual',
                        inherited: false,
                        animationType: [
                    Severity: Major
                    Found in packages/bredon-validate/src/data/__mdnData.js and 2 other locations - About 2 hrs to fix
                    packages/bredon-validate/src/data/__mdnData.js on lines 1343..1371
                    packages/bredon-validate/src/data/__mdnData.js on lines 1633..1661

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

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

                      'border-left': {
                        syntax: '<br-width> || <br-style> || <color>',
                        media: 'visual',
                        inherited: false,
                        animationType: [
                    Severity: Major
                    Found in packages/bredon-validate/src/data/__mdnData.js and 3 other locations - About 2 hrs to fix
                    packages/bredon-validate/src/data/__mdnData.js on lines 1234..1259
                    packages/bredon-validate/src/data/__mdnData.js on lines 1662..1683
                    packages/bredon-validate/src/data/__mdnData.js on lines 1763..1776

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

                    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