Skip to content

find code duplication with dynamic threshold and return report matrix

License

Notifications You must be signed in to change notification settings

paulvollmer/jsinspector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsinspector Build Status GitHub license

Detect copy-pasted and structurally similar JavaScript code based on the jsinspect tool but with a automated threshold parameter. the tool will be count the threshold up to the highest number to find the biggest code duplication.

This is experimental, do not use in production

installation

# install it as dependencies
npm install paulvollmer/jsinspector --save

# or install it globally
npm install -g paulvollmer/jsinspector

nodejs v6 or above is required

usage as cli

jsinspector -f fixtures/simple.js

usage as module

inspector('path/to/source.js', MIN_THRESHOLD, function(report) {
  console.log(report)
})