codeclimate/codeclimate-duplication

disable, enable, ignore-next pragmas

bennypowers opened this issue · 2 comments

JS/TS developers are used to:

/* eslint-disable */
/* eslint-enable */
/* istanbul ignore next */
/* istanbul ignore else */

It would be nice to have

/* codeclimate-duplication-disable */
/* codeclimate-duplication-enable */

Use cases:

  • config blocks, e.g. routing tables, yargs configuration blocks
  • test files
  • complex class inheritance statements that only slightly modify the base class

Hi @bennypowers - thanks for the suggestion! And great idea. I'll pass this along to our product team.

Best,
Emily

Good idea, till then, it is worth remembering we can also exclude paths for specific plugins:

plugins:
  duplication:
    enabled: true
    exclude_paths:
      - config.js
      - routes/