rofrischmann/elodin

View on GitHub

Showing 180 of 180 total issues

Avoid too many return statements within this function.
Open

    return (
      value.callee +
      '(' +
      value.params
        .map((param) => generateValue(param, property, false, true))
Severity: Major
Found in utils/css/src/generateValue.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

        return 'var(--' + hyphenateProperty(value.value) + ')'
    Severity: Major
    Found in utils/css/src/generateValue.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

          return color(colorValue)[value.callee](percentage).string()
      Severity: Major
      Found in utils/css/src/generateValue.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

          return {
            type: 'callee',
            message: 'The function `' + callee + '` is not a valid function.',
          }
        Severity: Major
        Found in core/parser/src/validateFunction.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

            return node.value
          Severity: Major
          Found in utils/javascript/src/generateValue.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                  return color(colorValue).negate().string()
            Severity: Major
            Found in utils/css/src/generateValue.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                    return '(max-' + dimension + ': ' + (value - 1) + 'px)'
              Severity: Major
              Found in utils/css/src/generateMediaQueryFromNode.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                    return hyphenateProperty(node.value)
                Severity: Major
                Found in utils/reason/src/generateValue.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                      return wrapInParens(
                        node.params
                          .map((value) => generateValue(value, property))
                          .join(inlineFns[node.callee])
                      )
                  Severity: Major
                  Found in utils/javascript/src/generateValue.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                        return wrapInString(node.value)
                    Severity: Major
                    Found in utils/javascript/src/generateValue.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                          return wrapInString(hyphenateProperty(node.value))
                      Severity: Major
                      Found in utils/javascript/src/generateValue.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                          return value.value
                        Severity: Major
                        Found in utils/css/src/generateValue.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                              return 'props.' + node.value
                          Severity: Major
                          Found in utils/javascript/src/generateValue.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                return hyphenateProperty(value.value)
                            Severity: Major
                            Found in utils/css/src/generateValue.js - About 30 mins to fix

                              Function Heading has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                              function Heading({ level, children }) {
                                const { theme } = useFela()
                                const router = useRouter()
                              
                                const id =
                              Severity: Minor
                              Found in website/components/DocLayout.js - About 25 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

                              Function parseNumber has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                                parseNumber(isNegative = false) {
                                  if (this.currentToken.type === 'number') {
                                    const integer = this.currentToken.value
                              
                                    const nextToken = this.getNextToken(1)
                              Severity: Minor
                              Found in core/parser/src/Parser.js - About 25 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

                              Function CodeBlock has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                              export default function CodeBlock({
                                children,
                                className = '',
                                nocopy = false,
                                name,
                              Severity: Minor
                              Found in website/components/CodeBlock.js - About 25 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

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

                                parseIdentifier() {
                                  if (this.currentToken.type === 'identifier') {
                                    const ident = this.currentToken.value
                                    const nextToken = this.getNextToken(1)
                                    if (nextToken.type === 'round_bracket' && nextToken.value === '(') {
                              Severity: Minor
                              Found in core/parser/src/Parser.js - About 25 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

                              Function generateFunction has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                              function generateFunction(node, floatingPercentage = false) {
                                if (stringFns[node.callee]) {
                                  return wrapInString(
                                    node.callee +
                                      '(' +
                              Severity: Minor
                              Found in utils/reason/src/generateValue.js - About 25 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

                              Function generateFunction has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                              function generateFunction(node, property, floatingPercentage = false) {
                                if (stringFns[node.callee]) {
                                  return wrapInString(
                                    node.callee +
                                      '(' +
                              Severity: Minor
                              Found in utils/javascript/src/generateValue.js - About 25 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

                              Severity
                              Category
                              Status
                              Source
                              Language