boldr/boldr-ui

View on GitHub

Showing 714 of 714 total issues

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

  it('should render an input with .boldrui-form__input and modifiers', () => {
    const component = shallow(<Input isActive isHovered isFocused />);
    expect(component.hasClass('boldrui-form__input')).toBe(true);
    expect(component.hasClass('is-active')).toBe(true);
    expect(component.hasClass('is-hovered')).toBe(true);
Severity: Major
Found in src/Form/__tests__/Input.test.js and 1 other location - About 4 hrs to fix
src/Form/__tests__/Field/FormField.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 131.

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

  it('should render a div with .boldrui-container, modifiers and custom classNames', () => {
    const container = shallow(<Container isFluid className="custom loader" />);
    expect(container.hasClass('boldrui-container')).toBe(true);
    expect(container.hasClass('is-fluid')).toBe(true);
    expect(container.hasClass('custom')).toBe(true);
Severity: Major
Found in src/Layout/Container.test.js and 5 other locations - About 4 hrs to fix
src/Form/__tests__/Control.test.js on lines 91..97
src/Hero/__tests__/Hero.test.js on lines 40..46
src/Hero/__tests__/HeroVideo.test.js on lines 23..29
src/Navbar/__tests__/NavbarItem.test.js on lines 57..63
src/Navbar/__tests__/NavbarLink.test.js on lines 48..54

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

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

  it('should render a div with .boldrui-navbar__item, modifiers and custom classNames', () => {
    const component = shallow(<NavbarItem isActive className="custom" />);
    expect(component.is('div')).toBe(true);
    expect(component.hasClass('boldrui-navbar__item')).toBe(true);
    expect(component.hasClass('is-active')).toBe(true);
Severity: Major
Found in src/Navbar/__tests__/NavbarItem.test.js and 5 other locations - About 4 hrs to fix
src/Form/__tests__/Control.test.js on lines 91..97
src/Hero/__tests__/Hero.test.js on lines 40..46
src/Hero/__tests__/HeroVideo.test.js on lines 23..29
src/Layout/Container.test.js on lines 23..29
src/Navbar/__tests__/NavbarLink.test.js on lines 48..54

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

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

  it('should render a div with .boldrui-form__control, modifiers and custom classNames', () => {
    const component = shallow(<Control isExpanded className="custom loader" />);
    expect(component.hasClass('boldrui-form__control')).toBe(true);
    expect(component.hasClass('is-expanded')).toBe(true);
    expect(component.hasClass('custom')).toBe(true);
Severity: Major
Found in src/Form/__tests__/Control.test.js and 5 other locations - About 4 hrs to fix
src/Hero/__tests__/Hero.test.js on lines 40..46
src/Hero/__tests__/HeroVideo.test.js on lines 23..29
src/Layout/Container.test.js on lines 23..29
src/Navbar/__tests__/NavbarItem.test.js on lines 57..63
src/Navbar/__tests__/NavbarLink.test.js on lines 48..54

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

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

  it('should render a a with .boldrui-navbar__link, modifiers and custom classNames', () => {
    const component = shallow(<NavbarLink isActive className="custom" />);
    expect(component.is('a')).toBe(true);
    expect(component.hasClass('boldrui-navbar__link')).toBe(true);
    expect(component.hasClass('is-active')).toBe(true);
Severity: Major
Found in src/Navbar/__tests__/NavbarLink.test.js and 5 other locations - About 4 hrs to fix
src/Form/__tests__/Control.test.js on lines 91..97
src/Hero/__tests__/Hero.test.js on lines 40..46
src/Hero/__tests__/HeroVideo.test.js on lines 23..29
src/Layout/Container.test.js on lines 23..29
src/Navbar/__tests__/NavbarItem.test.js on lines 57..63

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

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

  it('should render a div with .boldrui-hero__video, modifiers and custom classNames', () => {
    const container = shallow(<HeroVideo isTransparent className="custom loader" />);
    expect(container.hasClass('boldrui-hero__video')).toBe(true);
    expect(container.hasClass('is-transparent')).toBe(true);
    expect(container.hasClass('custom')).toBe(true);
Severity: Major
Found in src/Hero/__tests__/HeroVideo.test.js and 5 other locations - About 4 hrs to fix
src/Form/__tests__/Control.test.js on lines 91..97
src/Hero/__tests__/Hero.test.js on lines 40..46
src/Layout/Container.test.js on lines 23..29
src/Navbar/__tests__/NavbarItem.test.js on lines 57..63
src/Navbar/__tests__/NavbarLink.test.js on lines 48..54

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

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

  it('should render a section with .boldrui-hero, modifiers and custom classNames', () => {
    const container = shallow(<Hero isBold className="custom loader" />);
    expect(container.hasClass('boldrui-hero')).toBe(true);
    expect(container.hasClass('is-bold')).toBe(true);
    expect(container.hasClass('custom')).toBe(true);
Severity: Major
Found in src/Hero/__tests__/Hero.test.js and 5 other locations - About 4 hrs to fix
src/Form/__tests__/Control.test.js on lines 91..97
src/Hero/__tests__/HeroVideo.test.js on lines 23..29
src/Layout/Container.test.js on lines 23..29
src/Navbar/__tests__/NavbarItem.test.js on lines 57..63
src/Navbar/__tests__/NavbarLink.test.js on lines 48..54

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

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('renders correctly when pressing space', () => {
    const mockOnClick = jest.fn();
    const tree = renderer.create(
      <AccordionItemTitle onClick={mockOnClick}>
        <div>Fake Title</div>
Severity: Major
Found in src/Accordion/__tests__/AccordionItemTitle.test.js and 2 other locations - About 4 hrs to fix
src/Accordion/__tests__/AccordionItemTitle.test.js on lines 29..40
src/Accordion/__tests__/AccordionItemTitle.test.js on lines 55..66

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

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('renders correctly when pressing another key', () => {
    const mockOnClick = jest.fn();
    const tree = renderer.create(
      <AccordionItemTitle onClick={mockOnClick}>
        <div>Fake Title</div>
Severity: Major
Found in src/Accordion/__tests__/AccordionItemTitle.test.js and 2 other locations - About 4 hrs to fix
src/Accordion/__tests__/AccordionItemTitle.test.js on lines 29..40
src/Accordion/__tests__/AccordionItemTitle.test.js on lines 42..53

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

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('renders correctly when pressing enter', () => {
    const mockOnClick = jest.fn();
    const tree = renderer.create(
      <AccordionItemTitle onClick={mockOnClick}>
        <div>Fake Title</div>
Severity: Major
Found in src/Accordion/__tests__/AccordionItemTitle.test.js and 2 other locations - About 4 hrs to fix
src/Accordion/__tests__/AccordionItemTitle.test.js on lines 42..53
src/Accordion/__tests__/AccordionItemTitle.test.js on lines 55..66

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

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

function locate(anchorBoundingBox, containerBoundingBox, contentDimension, options) {
  const { right, bottom } = anchorBoundingBox;
  const x = right + options.cushion;
  const y = bottom - contentDimension.height;

Severity: Major
Found in src/Popover/placement/right-bottom.js and 1 other location - About 4 hrs to fix
src/Popover/placement/bottom-right.js on lines 11..27

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

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

export function locate(anchorBoundingBox, containerBoundingBox, contentDimension, options) {
  const { right, bottom } = anchorBoundingBox;
  const x = right - contentDimension.width;
  const y = bottom + options.cushion;

Severity: Major
Found in src/Popover/placement/bottom-right.js and 1 other location - About 4 hrs to fix
src/Popover/placement/right-bottom.js on lines 10..26

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

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 Tooltip.js has 336 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* eslint-disable react/no-find-dom-node, no-unused-expressions, no-return-assign */
import React, { cloneElement } from 'react';
import PropTypes from 'prop-types';
import ReactDOM from 'react-dom';

Severity: Minor
Found in src/Tooltip/Tooltip.js - About 4 hrs to fix

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

      it('should support custom prefix', () => {
        const wrapper = mount(
          <Portal prefix="custom-prefix">
            <div className="portal-child" />
          </Portal>,
    Severity: Major
    Found in src/Portal/__tests__/Portal.test.js and 1 other location - About 4 hrs to fix
    src/Portal/__tests__/Portal.test.js on lines 66..76

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

    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 support custom className', () => {
        const wrapper = mount(
          <Portal className="custom-className">
            <div className="portal-child" />
          </Portal>,
    Severity: Major
    Found in src/Portal/__tests__/Portal.test.js and 1 other location - About 4 hrs to fix
    src/Portal/__tests__/Portal.test.js on lines 92..102

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

    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 render a div with .boldrui-level__item, modifiers and classNames', () => {
        const component = shallow(
          <LevelItem isFlexible className="custom">
            My LevelItem
          </LevelItem>,
    Severity: Major
    Found in src/Level/__tests__/LevelItem.test.js and 1 other location - About 3 hrs to fix
    src/Level/__tests__/Level.test.js on lines 23..32

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

    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 render a nav with .boldrui-level, modifiers and classNames', () => {
        const component = shallow(
          <Level isMobile className="custom">
            My Level
          </Level>,
    Severity: Major
    Found in src/Level/__tests__/Level.test.js and 1 other location - About 3 hrs to fix
    src/Level/__tests__/LevelItem.test.js on lines 34..43

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

    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 Select.js has 322 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * Select
     */
    
    import React, { Component, Children } from 'react';
    Severity: Minor
    Found in src/Select/Select.js - About 3 hrs to fix

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

        it('should render a paragraph with .boldrui-form__help, modifiers and classNames', () => {
          const component = shallow(<Help isColor="dark" className="custom" />);
          expect(component.hasClass('boldrui-form__help')).toBe(true);
          expect(component.hasClass('is-dark')).toBe(true);
          expect(component.hasClass('custom')).toBe(true);
      Severity: Major
      Found in src/Form/__tests__/Help.test.js and 1 other location - About 3 hrs to fix
      src/Form/__tests__/Label.test.js on lines 18..23

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

      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 render a label with .boldrui-form__label, modifiers and custom classNames', () => {
          const component = shallow(<Label isSize="large" className="custom" />);
          expect(component.hasClass('boldrui-form__label')).toBe(true);
          expect(component.hasClass('is-large')).toBe(true);
          expect(component.hasClass('custom')).toBe(true);
      Severity: Major
      Found in src/Form/__tests__/Label.test.js and 1 other location - About 3 hrs to fix
      src/Form/__tests__/Help.test.js on lines 23..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 109.

      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