Nodejs项目重复文件扫描

项目地址:https://github.com/danielstjules/jsinspect

 

1.安装jsinspect

npm install -g jsinspect

 

2.进入至项目目录

d
cd report/wes/demoproject

 

3.执行扫描

jsinspect --t 50 --ignore "test" ./src

用法

Usage: jsinspect [options] <paths ...>


Detect copy-pasted and structurally similar JavaScript code
Example use: jsinspect -I -L -t 20 --ignore "test" ./path/to/src


Options:

  -h, --help                         output usage information
  -V, --version                      output the version number
  -t, --threshold <number>           number of nodes (default: 30)
  -m, --min-instances <number>       min instances for a match (default: 2)
  -c, --config [config]              path to config file (default: .jsinspectrc)
  -r, --reporter [default|json|pmd]  specify the reporter to use
  -I, --no-identifiers               do not match identifiers
  -L, --no-literals                  do not match literals
  -C, --no-color                     disable colors
  --ignore <pattern>                 ignore paths matching a regex
  --truncate <number>                length to truncate lines (default: 100, off: 0)
  --debug                            print debug information

 

posted @ 2018-11-15 15:17  WesChan  阅读(691)  评论(0)    收藏  举报