项目地址:
1.安装jsinspect
npm install -g jsinspect
2.进入至项目目录
dcd report/wes/demoproject
3.执行扫描
jsinspect --t 50 --ignore "test" ./src
用法
Usage: jsinspect [options]Detect copy-pasted and structurally similar JavaScript codeExample use: jsinspect -I -L -t 20 --ignore "test" ./path/to/srcOptions: -h, --help output usage information -V, --version output the version number -t, --threshold number of nodes (default: 30) -m, --min-instances 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 ignore paths matching a regex --truncate length to truncate lines (default: 100, off: 0) --debug print debug information