nexxtway/react-rainbow

View on GitHub
library/pages/ComponentsPage/index.js

Summary

Maintainability
C
1 day
Test Coverage

Function renderCards has 60 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    renderCards() {
        const {
            forms,
            dataViews,
            layouts,
Severity: Major
Found in library/pages/ComponentsPage/index.js - About 2 hrs to fix

    Function getComponentsByCategory has 45 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        getComponentsByCategory() {
            const { searchTerm } = this.state;
            const { components } = this.props;
            const filtered = filterSectionsByName(components, searchTerm);
            const categorizedComponents = {
    Severity: Minor
    Found in library/pages/ComponentsPage/index.js - About 1 hr to fix

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

          constructor(props) {
              super(props);
              this.state = {
                  searchTerm: '',
              };
      Severity: Major
      Found in library/pages/ComponentsPage/index.js and 3 other locations - About 1 hr to fix
      examples/create-react-app/src/pages/Admin/sideNavigation.js on lines 12..18
      examples/create-react-app/src/pages/Home/index.js on lines 11..17
      library/styleguideComponents/ReactComponent/index.js on lines 34..38

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

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

                      <RenderIf isTrue={forms.length}>
                          <h1 className="react-rainbow-components-page_category-title">
                              Forms ({forms.length})
                          </h1>
                      </RenderIf>
      Severity: Major
      Found in library/pages/ComponentsPage/index.js and 4 other locations - About 40 mins to fix
      library/pages/ComponentsPage/index.js on lines 88..92
      library/pages/ComponentsPage/index.js on lines 100..104
      library/pages/ComponentsPage/index.js on lines 108..112
      library/pages/ComponentsPage/index.js on lines 116..120

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

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

                      <RenderIf isTrue={experiences.length}>
                          <h1 className="react-rainbow-components-page_category-title">
                              Experiences ({experiences.length})
                          </h1>
                      </RenderIf>
      Severity: Major
      Found in library/pages/ComponentsPage/index.js and 4 other locations - About 40 mins to fix
      library/pages/ComponentsPage/index.js on lines 88..92
      library/pages/ComponentsPage/index.js on lines 94..98
      library/pages/ComponentsPage/index.js on lines 100..104
      library/pages/ComponentsPage/index.js on lines 108..112

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

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

                      <RenderIf isTrue={layouts.length}>
                          <h1 className="react-rainbow-components-page_category-title">
                              Layout Components ({layouts.length})
                          </h1>
                      </RenderIf>
      Severity: Major
      Found in library/pages/ComponentsPage/index.js and 4 other locations - About 40 mins to fix
      library/pages/ComponentsPage/index.js on lines 94..98
      library/pages/ComponentsPage/index.js on lines 100..104
      library/pages/ComponentsPage/index.js on lines 108..112
      library/pages/ComponentsPage/index.js on lines 116..120

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

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

                      <RenderIf isTrue={miscellaneous.length}>
                          <h1 className="react-rainbow-components-page_category-title">
                              Miscellaneous ({miscellaneous.length})
                          </h1>
                      </RenderIf>
      Severity: Major
      Found in library/pages/ComponentsPage/index.js and 4 other locations - About 40 mins to fix
      library/pages/ComponentsPage/index.js on lines 88..92
      library/pages/ComponentsPage/index.js on lines 94..98
      library/pages/ComponentsPage/index.js on lines 108..112
      library/pages/ComponentsPage/index.js on lines 116..120

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

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

                      <RenderIf isTrue={dataViews.length}>
                          <h1 className="react-rainbow-components-page_category-title">
                              Data View ({dataViews.length})
                          </h1>
                      </RenderIf>
      Severity: Major
      Found in library/pages/ComponentsPage/index.js and 4 other locations - About 40 mins to fix
      library/pages/ComponentsPage/index.js on lines 88..92
      library/pages/ComponentsPage/index.js on lines 94..98
      library/pages/ComponentsPage/index.js on lines 100..104
      library/pages/ComponentsPage/index.js on lines 116..120

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

      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

      There are no issues that match your filters.

      Category
      Status