← Back to changelog

Smarter duplication detection! 🤓

Our duplication analysis is great for finding accidental copy-paste or slightly modified pieces of code in your project. However, sometimes it would report common pieces of boilerplate when those are perfectly legitimate uses of the language. One example is large numbers of module requires in JavaScript, such as:

const ModuleA = require("module_a"),
  ModuleB = require("module_b"),
  ModuleC = require("module_c"),
  ModuleD = require("module_d"),
  ModuleE = require("module_e");

Another example is import statements:

import React, { Component, PropTypes } from 'react'
import { Table, TableBody, TableHeader, TableHeaderColumn, TableRow } from 'material-ui/Table'
import values from 'lodash/values'
import { v4 } from 'uuid

We’ve recently made our duplication analysis smarter so that common patterns like these in Java, JavaScript, and PHP will no longer be reported as duplication on Code Climate, so you can be more confident in the duplication results you do see from Code Climate.

Actionable metrics for engineering leaders. Try Velocity Free