Duplication Detection now available for Engines-based Analysis
We’re thrilled to introduce our new duplication engine for the Code Climate platform! While duplication detection has been a key part of our analysis for years, this release open sources our duplication detection code, and makes it available for our engines-based analysis.
Our duplication engine currently supports Ruby, JavaScript (including JSX), PHP, and Python out of the box. We welcome contributions, so if you’d like to see a new language supported, open an issue/PR or tweet @codeclimate!
To enable the duplication engine for your project, add the following to your .codeclimate.yml
configuration file:
engines:
duplication:
enabled: true
config:
languages:
- ruby
- javascript
- python
- php
ratings:
paths:
- "**.rb"
- "**.py"
- "**.php"
- "**.js"
- "**.jsx"
Most projects don’t have so many languages present within a single repository, so feel free to adjust the above to suit your project’s languages.
If you have the CLI installed, you can enable the engine with the engines:enable
CLI command:
$ brew update && brew upgrade codeclimate
$ cd ~/my/awesome/app
$ codeclimate engines:enable duplication
Enable the duplication engine for your project today to keep your code DRY!