Highlight repetition in Atom to help you stay DRY 🌂
apm install linter-dryer
Or install it from within Atom by going to Settings → Install and searching for
This package provides “copy–paste detection” for files and projects in Atom, using
jscpd. It will highlight code in the text editor that is repeated elsewhere. You may need to adjust the settings to get results that work well for your specific project.
jscpd supports a wide range of languages and a full list is available in the
Set how many lines must repeat before they are flagged as a repetition by
Code is processed and tokenized by
jscpd in order to find repetitions that are similar but not identical. This sets how many tokens need to match to qualify as a repetition. Values that are too low may produce meaningless output, while values that are too high may not return any results.
Set whether the linter should look for repetitions only in the current file, or throughout the current project.
Specify files like
.npmignore to use in deciding which files linter-dryer should ignore.
Files that match any of the patterns set here will be ignored when looking for repetition. (See
minimatch for globbing documentation.) These patterns are applied in addition to rules found in any files set in the .ignore files option.
Sets how the linter UI highlights repetitions in Atom. By default, a blue “info” level is set, but users can choose to have repetitions highlighted as warnings (orange) or errors (red).
All contributions to this package — no matter how small — are welcome! Please see the contribution guidelines for notes on opening issues and submitting pull requests and the code of conduct for rules about how to treat other developers with kindness and respect.
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.