wahanegi/vibereport

View on GitHub

Showing 248 of 274 total issues

Function RichInputElement has a Cognitive Complexity of 241 (exceeds 5 allowed). Consider refactoring.
Open

const RichInputElement = ({ richText = '',
                           listUsers: listAllUsers,
                           setChosenUsers = ()=>{},
                           onSubmit ,
                           onClose,
Severity: Minor
Found in app/javascript/components/UI/rich-text/RichInputElement.js - About 4 days 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

Class has too many lines. [220/100]
Open

class Api::V1::ResultsPresenter
  include ApplicationHelper
  include ActiveAdminHelpers

  attr_reader :fun_question, :time_period, :current_user, :responses, :fun_question_answers, :users, :teams, :original_url

Checks if the length a class exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

You can set literals you want to fold with CountAsOne. Available are: 'array', 'hash', and 'heredoc'. Each literal will be counted as one line regardless of its actual size.

Example: CountAsOne: ['array', 'heredoc']

class Foo
  ARRAY = [         # +1
    1,
    2
  ]

  HASH = {          # +3
    key: 'value'
  }

  MSG = <<~HEREDOC  # +1
    Heredoc
    content.
  HEREDOC
end                 # 5 points

NOTE: This cop also applies for Struct definitions.

File RichInputElement.test.js has 564 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React from 'react';
  import { render, fireEvent , screen } from '@testing-library/react';
import RichInputElement from "../UI/rich-text/RichInputElement";
import Cursor from "../UI/rich-text/cursor";
import  RichText  from "../UI/rich-text/rich-text"
Severity: Major
Found in app/javascript/components/__tests__/RichInputElement.test.js - About 1 day to fix

    Function handleKeyDown has 216 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      const handleKeyDown = event => {
        event.preventDefault()
        const selectedValue = window.getSelection().toString();
        const text = element.textContent
        const cursorPos = Cursor.getCurrentCursorPosition(element, initCoordinates)
    Severity: Major
    Found in app/javascript/components/UI/rich-text/RichInputElement.js - About 1 day to fix

      Function getCurrentCursorPosition has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
      Open

          static getCurrentCursorPosition(parentElement, initCoord = {x: 0, y: 0}) {
              if(window.getSelection()) {
                  const selection = window.getSelection()
                  let charCount = -1
                  let focusNode = null
      Severity: Minor
      Found in app/javascript/components/UI/rich-text/cursor.js - About 7 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

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

        const Footer = () => <Fragment>
          <QuestionButton data={data} />
          <ShoutOutIcon addClass={nextTimePeriod ? 'd-none' : 'hud shoutout'} onClick = {() => {setShowModal(true)}} />
          {
            nextTimePeriod && isBlank(data.prev_results_path) ?
      Severity: Major
      Found in app/javascript/components/Pages/ResultsPageManager/index.js and 1 other location - About 6 hrs to fix
      app/javascript/components/Pages/ResultsPage/index.js on lines 143..155

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

      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

        const Footer = () => <Fragment>
          <QuestionButton data={data} />
          <ShoutOutIcon addClass={nextTimePeriod ? 'd-none' : 'hud shoutout'} onClick = {() => {setShowModal(true)}} />
          {
            nextTimePeriod && isBlank(data.prev_results_path) ?
      Severity: Major
      Found in app/javascript/components/Pages/ResultsPage/index.js and 1 other location - About 6 hrs to fix
      app/javascript/components/Pages/ResultsPageManager/index.js on lines 88..100

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

      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

                  <div className='col p-0 minW-280' hidden={isEmpty(sentShoutouts)}>
                    {sentShoutouts.slice(0, 2).map((shoutout, i) =>
                      <div className='row d-inline-block'  key={i}>
                        <p className='fw-semibold d-inline'>
                          <span className='color-rose'>@</span><span className='fw-bold'>{shoutout.recipient.first_name}</span> got {shoutout.count} {Pluralize( 'Shoutout', shoutout.count )}&nbsp;
      app/javascript/components/Pages/ResultsPage/ShoutoutAwards.js on lines 23..31

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

      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

                  <div className='col p-0 minW-280' hidden={isEmpty(receivedShoutouts)}>
                    {receivedShoutouts.slice(0, 2).map((shoutout, i) =>
                      <div className='row d-inline-block' key={i}>
                        <p className='fw-semibold d-inline'>
                          <span className='color-rose'> @</span><span className='fw-bold'>{shoutout.sender.first_name}</span> sent {shoutout.count} {Pluralize( 'Shoutout', shoutout.count )}&nbsp;
      app/javascript/components/Pages/ResultsPage/ShoutoutAwards.js on lines 32..40

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

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

      import React, { useEffect, useRef, useState} from 'react';
      import Cursor from "../rich-text/cursor";
      import DropDownList from "./DropDownList";
      import {userFullName} from "../../helpers/library";
      import RichText from "./rich-text";
      Severity: Minor
      Found in app/javascript/components/UI/rich-text/RichInputElement.js - About 5 hrs to fix

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

            if (notWorking) {
              return setShowWorkingModal(true)
            } else {
              const new_steps = steps.slice(0, index + 1);
              const steps_arr = isEmpty(new_steps) ? ['emotion-selection-web', 'productivity-check'] : new_steps
        Severity: Major
        Found in app/javascript/components/Pages/ResultsPage/NavigationBar.js and 1 other location - About 5 hrs to fix
        app/javascript/components/Pages/ResultsPageManager/NavigationBar.js on lines 16..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 145.

        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

            if (notWorking) {
              return setShowWorkingModal(true)
            } else {
              const new_steps = steps.slice(0, index + 1);
              const steps_arr = isEmpty(new_steps) ? ['emotion-selection-web', 'productivity-check'] : new_steps
        app/javascript/components/Pages/ResultsPage/NavigationBar.js on lines 19..35

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

        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

                {
                  !nextTimePeriod ?
                    isMinUsersResponses ?
                      <div className='text-header-position'>
                        <h1 className='mb-0'>You're one of the first<br/>to check in!</h1>
        Severity: Major
        Found in app/javascript/components/Pages/ResultsPageManager/index.js and 1 other location - About 4 hrs to fix
        app/javascript/components/Pages/ResultsPage/index.js on lines 165..174

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

        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

                {
                  !nextTimePeriod ?
                    isMinUsersResponses ?
                      <div className='text-header-position'>
                        <h1 className='mb-0'>You're one of the first<br/>to check in!</h1>
        Severity: Major
        Found in app/javascript/components/Pages/ResultsPage/index.js and 1 other location - About 4 hrs to fix
        app/javascript/components/Pages/ResultsPageManager/index.js on lines 110..119

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

        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

                <div className='column'>
                  <div className='row my-2'>
                    <Button className='btn-modal c1 back border-0 w-auto' onClick={() => {setShow(false)}}>No, go back</Button>
                  </div>
                  <div className='row mb-2'>
        Severity: Major
        Found in app/javascript/components/Pages/modals/NotWorkingModal.js and 1 other location - About 4 hrs to fix
        app/javascript/components/Pages/modals/WorkingModal.js on lines 36..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 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

                <div className='d-flex justify-content-lg-between'>
                  <div className='m-3'>
                    <Button className='btn-modal c1 delete border-0 w-auto' onClick={() => {setShow(false)}}>Skip check-in</Button>
                  </div>
                  <div className='m-3'>
        Severity: Major
        Found in app/javascript/components/Pages/modals/WorkingModal.js and 1 other location - About 4 hrs to fix
        app/javascript/components/Pages/modals/NotWorkingModal.js on lines 24..31

        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

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

          const onConfirmAction = () => {
            steps[steps.length - 1] = notice['last_step']
            const dataRequest = {
              response: {
                attributes: {
        Severity: Major
        Found in app/javascript/components/Pages/ResultsPage/index.js and 1 other location - About 3 hrs to fix
        app/javascript/components/Pages/ResultsPageManager/index.js on lines 47..60

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

        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 handlingOnClickNext = () => {
            const dataFromServer = (fun_question_answer) =>{
              steps.push('icebreaker-question')
              saveDataToDb( steps, {fun_question_answer_id: fun_question_answer.data.id, draft: false} )
            }
        Severity: Major
        Found in app/javascript/components/Pages/IcebreakerAnswer.js and 1 other location - About 3 hrs to fix
        app/javascript/components/Pages/IcebreakerQuestion.js on lines 42..52

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

        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

              expect(setChosenUsersMock).toHaveBeenCalledWith(
                  [{id: 1, first_name: 'George', last_name: 'Washington'},
                    {id: 2, first_name: 'Jackie', last_name: 'Chan'},
                    {id: 3, first_name: 'Janice', last_name: 'Wednesday'},
                    {id: 9, first_name: 'roger', last_name: ''},
        app/javascript/components/__tests__/RichInputElement.test.js on lines 262..268
        app/javascript/components/__tests__/RichInputElement.test.js on lines 288..294
        app/javascript/components/__tests__/RichInputElement.test.js on lines 344..350

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

        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

              expect(setChosenUsersMock).toHaveBeenCalledWith(
                  [{id: 1, first_name: 'George', last_name: 'Washington'},
                    {id: 2, first_name: 'Jackie', last_name: 'Chan'},
                    {id: 3, first_name: 'Janice', last_name: 'Wednesday'},
                    {id: 9, first_name: 'roger', last_name: ''},
        app/javascript/components/__tests__/RichInputElement.test.js on lines 262..268
        app/javascript/components/__tests__/RichInputElement.test.js on lines 314..320
        app/javascript/components/__tests__/RichInputElement.test.js on lines 344..350

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

        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