streetmix/streetmix

View on GitHub

Showing 801 of 806 total issues

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

  it('should respond with 201 Created when a data url is sent', () => {
    cloudinary.v2.api.resource.mockResolvedValueOnce('baz')
    jwtMock.mockReturnValueOnce(mockUser)
    return request(app)
      .post(`/api/v1/streets/${street.id}/images`)
Severity: Major
Found in app/resources/v1/__tests__/street_images.test.js and 1 other location - About 4 hrs to fix
app/resources/v1/__tests__/street_images.test.js on lines 70..82

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

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('renders location label but does nothing on click if location is not editable', async () => {
    const { getByText } = render(<StreetMetaGeotag />, {
      initialState: {
        street: {
          location: {
Severity: Major
Found in client/src/streets/StreetMeta/StreetMetaGeotag.test.jsx and 1 other location - About 4 hrs to fix
client/src/streets/StreetMeta/StreetMetaGeotag.test.jsx on lines 46..64

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

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('renders location label and opens dialog if location is editable', async () => {
    const { getByText } = render(<StreetMetaGeotag />, {
      initialState: {
        street: {
          location: {
Severity: Major
Found in client/src/streets/StreetMeta/StreetMetaGeotag.test.jsx and 1 other location - About 4 hrs to fix
client/src/streets/StreetMeta/StreetMetaGeotag.test.jsx on lines 66..84

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

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

const WrappedScrollable = forwardRef(function Scrollable (
  props: ScrollableProps,
  ref: React.Ref<HTMLDivElement>
): React.ReactElement {
  const {
Severity: Major
Found in client/src/ui/Scrollable.tsx - About 4 hrs to fix

File street.ts has 365 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { createSlice } from '@reduxjs/toolkit'

import { getVariantString } from '../../segments/variant_utils'
import { DEFAULT_SKYBOX } from '../../sky/constants'
import { MAX_BUILDING_HEIGHT } from '../../segments/constants'
Severity: Minor
Found in client/src/store/slices/street.ts - About 4 hrs to fix

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

      it('by resolution (imperial)', async () => {
        const initialState = {
          street: { segments: [{ width: 3.048 }, { width: 3.048 }], units: 1 }
        }
        const store = createStore(initialState)
Severity: Major
Found in client/src/store/__tests__/street.integration.test.js and 4 other locations - About 4 hrs to fix
client/src/store/__tests__/street.integration.test.js on lines 54..64
client/src/store/__tests__/street.integration.test.js on lines 78..88
client/src/store/__tests__/street.integration.test.js on lines 122..132
client/src/store/__tests__/street.integration.test.js on lines 134..144

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

      it('by resolution', async () => {
        const initialState = {
          street: { segments: [{ width: 5 }, { width: 5 }], units: 0 }
        }
        const store = createStore(initialState)
Severity: Major
Found in client/src/store/__tests__/street.integration.test.js and 4 other locations - About 4 hrs to fix
client/src/store/__tests__/street.integration.test.js on lines 54..64
client/src/store/__tests__/street.integration.test.js on lines 66..76
client/src/store/__tests__/street.integration.test.js on lines 78..88
client/src/store/__tests__/street.integration.test.js on lines 134..144

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

      it('by clickIncrement', async () => {
        const initialState = {
          street: { segments: [{ width: 3.658 }, { width: 3.658 }], units: 1 }
        }
        const store = createStore(initialState)
Severity: Major
Found in client/src/store/__tests__/street.integration.test.js and 4 other locations - About 4 hrs to fix
client/src/store/__tests__/street.integration.test.js on lines 54..64
client/src/store/__tests__/street.integration.test.js on lines 66..76
client/src/store/__tests__/street.integration.test.js on lines 78..88
client/src/store/__tests__/street.integration.test.js on lines 122..132

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

      it('by resolution (metric)', async () => {
        const initialState = {
          street: { segments: [{ width: 10 }, { width: 10 }], units: 0 }
        }
        const store = createStore(initialState)
Severity: Major
Found in client/src/store/__tests__/street.integration.test.js and 4 other locations - About 4 hrs to fix
client/src/store/__tests__/street.integration.test.js on lines 66..76
client/src/store/__tests__/street.integration.test.js on lines 78..88
client/src/store/__tests__/street.integration.test.js on lines 122..132
client/src/store/__tests__/street.integration.test.js on lines 134..144

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

      it('by clickIncrement', async () => {
        const initialState = {
          street: { segments: [{ width: 6.05 }, { width: 6.05 }], units: 0 }
        }
        const store = createStore(initialState)
Severity: Major
Found in client/src/store/__tests__/street.integration.test.js and 4 other locations - About 4 hrs to fix
client/src/store/__tests__/street.integration.test.js on lines 54..64
client/src/store/__tests__/street.integration.test.js on lines 66..76
client/src/store/__tests__/street.integration.test.js on lines 122..132
client/src/store/__tests__/street.integration.test.js on lines 134..144

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

Function doDropHeuristics has 118 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function doDropHeuristics (draggedItem, draggedItemType) {
  // Automatically figure out width
  const street = store.getState().street
  const { variantString, type, actualWidth } = draggedItem

Severity: Major
Found in client/src/segments/drag_and_drop.js - About 4 hrs to fix

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

    case ERRORS.STREET_DATA_FAILURE:
      title = (
        <FormattedMessage
          id="msg.having-trouble"
          defaultMessage="Having trouble…"
Severity: Major
Found in client/src/app/BlockingError.jsx and 2 other locations - About 4 hrs to fix
client/src/app/BlockingError.jsx on lines 296..323
client/src/app/BlockingError.jsx on lines 324..351

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

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

    case ERRORS.SIGN_IN_401:
      title = (
        <FormattedMessage
          id="msg.having-trouble"
          defaultMessage="Having trouble…"
Severity: Major
Found in client/src/app/BlockingError.jsx and 2 other locations - About 4 hrs to fix
client/src/app/BlockingError.jsx on lines 296..323
client/src/app/BlockingError.jsx on lines 352..379

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

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

    case ERRORS.SIGN_IN_SERVER_FAILURE:
      title = (
        <FormattedMessage
          id="msg.having-trouble"
          defaultMessage="Having trouble…"
Severity: Major
Found in client/src/app/BlockingError.jsx and 2 other locations - About 4 hrs to fix
client/src/app/BlockingError.jsx on lines 324..351
client/src/app/BlockingError.jsx on lines 352..379

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

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 put has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
Open

export async function put (req, res) {
  let body

  if (req.body) {
    try {
Severity: Minor
Found in app/resources/v1/streets.js - About 4 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

  it('handles click and name change', async () => {
    // Mock window.prompt() and have it return a new name
    const mockPrompt = vi.spyOn(window, 'prompt')
    mockPrompt.mockImplementation(() => 'bar')

Severity: Major
Found in client/src/streets/StreetNameplateContainer.test.jsx and 1 other location - About 4 hrs to fix
client/src/streets/StreetNameplateContainer.test.jsx on lines 73..89

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

  it('doesn’t change the name if prompt returns empty string', async () => {
    // Mock window.prompt() and have it return a new name
    const mockPrompt = vi.spyOn(window, 'prompt')
    mockPrompt.mockImplementation(() => '')

Severity: Major
Found in client/src/streets/StreetNameplateContainer.test.jsx and 1 other location - About 4 hrs to fix
client/src/streets/StreetNameplateContainer.test.jsx on lines 55..71

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

    it('shows geocoding is unavailable if geocoder host name is not set', () => {
      // Set API key to undefined
      vi.spyOn(constants, 'PELIAS_API_KEY', 'get').mockReturnValue(undefined)

      render(<GeotagDialog />, { initialState })
Severity: Major
Found in client/src/dialogs/__tests__/GeotagDialog.test.jsx and 1 other location - About 4 hrs to fix
client/src/dialogs/__tests__/GeotagDialog.test.jsx on lines 130..143

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

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('shows geocoding is unavailable if geocoder key is unset', () => {
      // Set API key to undefined
      vi.spyOn(constants, 'PELIAS_API_KEY', 'get').mockReturnValue(undefined)

      render(<GeotagDialog />, { initialState })
Severity: Major
Found in client/src/dialogs/__tests__/GeotagDialog.test.jsx and 1 other location - About 4 hrs to fix
client/src/dialogs/__tests__/GeotagDialog.test.jsx on lines 145..158

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

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

                      <li>
                        <FormattedMessage
                          id="dialogs.about.icons-by"
                          defaultMessage="Icons by {author}."
                          values={{
Severity: Major
Found in client/src/dialogs/AboutDialog.tsx and 1 other location - About 4 hrs to fix
client/src/dialogs/AboutDialog.tsx on lines 212..239

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

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