padraigfl/packard-belle

View on GitHub

Showing 159 of 159 total issues

Function withContextLogic has 99 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const withContextLogic = ContextButton => {
  return class StandardMenuSimple extends Component {
    static defaultProps = {
      value: [],
    };
Severity: Major
Found in src/components/StandardMenu/withMenuWrapper.js - About 3 hrs to fix

    Function withContextLogic has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
    Open

    const withContextLogic = ContextButton => {
      return class StandardMenuSimple extends Component {
        static defaultProps = {
          value: [],
        };
    Severity: Minor
    Found in src/components/StandardMenu/withMenuWrapper.js - About 3 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

    const NavButton = props => (
      <Button
        className={ classnames('NavButton', props.className) }
        onClick={ props.onClick }
        isActive={ props.isActive }
    Severity: Major
    Found in src/components/Button/NavButton.js and 1 other location - About 1 hr to fix
    src/components/Button/StartButton.js on lines 7..14

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

    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

    const StartButton = props => (
      <Button
        className={ classnames('StartButton', props.className) }
        onClick={ props.onClick }
        onBlur={ props.onBlur }
    Severity: Major
    Found in src/components/Button/StartButton.js and 1 other location - About 1 hr to fix
    src/components/Button/NavButton.js on lines 7..14

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

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

      render() {
        const { props } = this;
    
        const iconProps = {
          onDoubleClick: props.onDoubleClick,
    Severity: Minor
    Found in src/components/Icon/AbstractIcon.js - About 1 hr to fix

      Function ExplorerWindow has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const ExplorerWindow = props => {
        const footer = insertDefaultFooter(props.footer);
        return (
          <Window
            className={classnames('ExplorerWindow window--explorer', props.className)}
      Severity: Minor
      Found in src/components/Window/ExplorerWindow.js - About 1 hr to fix

        Function SelectBox has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const SelectBox = (props) => {
          const Comp = props.component ? props.component : 'button';
          return (
            <div className={
              classnames(
        Severity: Minor
        Found in src/components/Inputs/SelectBox.js - About 1 hr to fix

          Function render has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            render() {
              const { props } = this;
          
              return (
                <button
          Severity: Minor
          Found in src/components/Button/AbstractButton.js - About 1 hr to fix

            Definition for rule 'jest/no-disabled-tests' was not found
            Open

            import React from 'react';
            Severity: Minor
            Found in src/components/TaskBar/Notifier.js by eslint

            For more information visit Source: http://eslint.org/docs/rules/

            Definition for rule 'jest/no-focused-tests' was not found
            Open

            import React from 'react';

            For more information visit Source: http://eslint.org/docs/rules/

            Definition for rule 'jest/no-disabled-tests' was not found
            Open

            import React from 'react';

            For more information visit Source: http://eslint.org/docs/rules/

            Definition for rule 'jest/no-focused-tests' was not found
            Open

            import React from 'react';
            Severity: Minor
            Found in src/components/Window/WindowFrame.js by eslint

            For more information visit Source: http://eslint.org/docs/rules/

            Definition for rule 'jest/valid-expect' was not found
            Open

            import React from 'react';
            Severity: Minor
            Found in src/components/Theme.js by eslint

            For more information visit Source: http://eslint.org/docs/rules/

            Definition for rule 'jest/no-focused-tests' was not found
            Open

            import React from 'react';
            Severity: Minor
            Found in src/components/Icon/ExplorerIcon.js by eslint

            For more information visit Source: http://eslint.org/docs/rules/

            Definition for rule 'jest/no-focused-tests' was not found
            Open

            import React from 'react';
            Severity: Minor
            Found in src/components/Icon/ListIcon.js by eslint

            For more information visit Source: http://eslint.org/docs/rules/

            Definition for rule 'jest/no-disabled-tests' was not found
            Open

            export { default as ExplorerIcon } from './ExplorerIcon';
            Severity: Minor
            Found in src/components/Icon/index.js by eslint

            For more information visit Source: http://eslint.org/docs/rules/

            Definition for rule 'jest/no-focused-tests' was not found
            Open

            import React, { Component } from 'react';
            Severity: Minor
            Found in src/components/Inputs/Select.js by eslint

            For more information visit Source: http://eslint.org/docs/rules/

            Definition for rule 'jest/no-identical-title' was not found
            Open

            import React, { Component } from 'react';
            Severity: Minor
            Found in src/components/Inputs/Select.js by eslint

            For more information visit Source: http://eslint.org/docs/rules/

            Definition for rule 'jest/no-disabled-tests' was not found
            Open

            import React from 'react';
            Severity: Minor
            Found in src/components/Inputs/Radio.js by eslint

            For more information visit Source: http://eslint.org/docs/rules/

            Definition for rule 'jest/no-focused-tests' was not found
            Open

            import React from 'react';
            Severity: Minor
            Found in src/components/Inputs/SelectBox.js by eslint

            For more information visit Source: http://eslint.org/docs/rules/

            Severity
            Category
            Status
            Source
            Language