Is there any tool to detect duplicate code in JavaScript? I tried the "PMD Duplicate code detector", but it does not support the .js extension.
You can use JS Inspect to detect copied and structurally similar code, it also supports*.js
*.js
npm install -g jsinspect
jsinspect -t 50 ./path/to/src
I would recommend looking at this stream (also on stackoverflow): Javascript source code analysis (in particular duplication check)
IDE . IntelliJ, IDE 2 :
npm install -g jscpd
jscpd ./path/to/code
( , , html : jscpd -r html./path/to/code)
jscpd -r html./path/to/code
:
Source: https://habr.com/ru/post/1770265/More articles:The unique identifier for the UIView object is iphoneProblem parsing XML on iPhone - soapReset Altera M9K content to 0 (power value) - vhdlCobertura with Ant Script: xml / html coverage report always shows 0% coverage worldwide - junitHow to remove the longest prefix that appears in an array? - arrayscrossite scripting using script tag, change src of script tag, can id be used for script tag - javascriptJavascript source code analysis (in particular, duplication check) - code-analysisMTD / YTD Execution Calculates Multiple Calendars in Analysis Services - ssasHow does Facebook grab article text when pasting an url? - ajaxHow to determine when the input is alphabetic? - pythonAll Articles