项目地址: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

 

相关文章:

  • 2022-02-09
  • 2022-12-23
  • 2021-12-25
  • 2021-04-11
  • 2022-12-23
  • 2021-10-11
  • 2022-12-23
猜你喜欢
  • 2021-11-11
  • 2022-12-23
  • 2021-11-19
  • 2022-01-27
  • 2021-11-22
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案