Giter VIP home page Giter VIP logo

gulp-jscpd's Introduction

gulp-jscpd

Maintenance Status NPM version Build Status Dependency Status Coverage Status Code Climate

Gulp plugin for the copy/paste detector jscpd.

Installation

$ npm install gulp-jscpd

Usage

var gulp  = require('gulp');
var jscpd = require('gulp-jscpd');

gulp.task('jscpd', function() {
  return gulp.src('**/*.js')
    .pipe(jscpd({
      'min-lines': 10,
      verbose    : true
    }));
});

Options

min-lines

Type: Number

Min size of duplication in code lines, default to 5.

min-tokens

Type: Number

Min size of duplication in code tokens, default to 70.

reporter

Type: String

Reporter name or path to the custom reporter, default to xml.

languages

Type: Array

List of languages which scan for duplicates, default to ['javascript', 'typescript', 'jsx', 'haxe', 'coffeescript', 'ruby', 'php', 'python', 'css', 'java', 'csharp', 'go', 'clike', 'htmlmixed'].

output

Type: String

Path to report XML file, default to null (no report file).

verbose

Type: Boolean

Show full info about copies, default to false.

debug

Type: Boolean

Show debug information (options list and selected files), default to false.

silent

Type: Boolean

Don't throw an error in case of duplicated occurrences (useful for CI), default to false.

Tests

Run tests using mocha

$ npm test

Code Coverage

Output a code coverage report in coverage.html

$ npm run coverage

Code Style

Check the code style with JSCS

$ npm run checkstyle

License

gulp-jscpd is licensed under the MIT License.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.