• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

yannickcr/gulp-jscpd: Gulp plugin for the copy/paste detector jscpd

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

yannickcr/gulp-jscpd

开源软件地址(OpenSource Url):

https://github.com/yannickcr/gulp-jscpd

开源编程语言(OpenSource Language):

JavaScript 100.0%

开源软件介绍(OpenSource 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 print a report summary, default to false.

failOnError

Type: Boolean

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

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.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap