jsinspect
jsinspect copied to clipboard
Detect copy-pasted and structurally similar code
Would be nice to highlight the identifiers/literals that are the only difference between the snippets, when one uses the `-I` or `-L` options, in a similar manner to a color...
I'd love to start using JSInspect on our code base to make sure no new duplicated code is added. However, we have tens of thousands of lines of code already,...
This PR offer 2 cases: 1. Add options.lineNumber for print out file `.jsinspectrc` ```js { "lineNumber": true } ``` result: ```js ./src/index.js:62,65 62 │ methods: { 63 │ hahahaha() {...
fixes #76
Returns: > Invalid config file: Unexpected token } in JSON at position 210 for ```json { "threshold": 30, "identifiers": true, "literals": true, "color": true, "minInstances": 2, "ignore": "test|spec|mock", "reporter": "json",...
``` Couldn't parse ./src/request.js: Unexpected token (20:43) const baseUrl = services[request.service]?.gateway?.endpoint; ^ ```
Easier path to lib adoption: e.g. `"inspect": "npx jsinspect -m 3 -t 50 ./src",`
Can this tool work with Javascript-like languages like Solidity?
Hi, Currently it's [only possible](https://github.com/danielstjules/jsinspect/blob/019b0bf33d3ff23dc9b9f5c2e6170bcde6f66b18/bin/jsinspect#L100-L103) to select one of the build in reporters. It would be great if custom reporter could be specified via CLI or `.jsinspectrc` config file. It...
This PR adds a basic esdoc config to build the docs of the lib directory. the build can be triggered with the `npm run docs` command. A generated preview can...