最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Duplicate code detection: Tools you can use - Stack Overflow

programmeradmin4浏览0评论

I am looking out for a software that identifies duplicate/redundant Javascript code. I found one such tool named CloneDR, but don't know how good it is .

I was looking out for similar open source tools . Please guide .

I am looking out for a software that identifies duplicate/redundant Javascript code. I found one such tool named CloneDR, but don't know how good it is .

I was looking out for similar open source tools . Please guide .

Share Improve this question edited Jan 8, 2020 at 10:35 Linus Fernandes 4966 silver badges34 bronze badges asked Jun 28, 2011 at 9:23 AazimAazim 1491 silver badge6 bronze badges 2
  • 1 I'm not entirely sure what duplicate code means, but Google's Closure Compiler will press your code and strip out any which is unused. – Nathan Commented Jun 28, 2011 at 9:50
  • 2 This is a possible duplicate of the following stackoverflow question stackoverflow./questions/546487/… – user1066510 Commented Feb 3, 2013 at 20:03
Add a ment  | 

3 Answers 3

Reset to default 1

I used PMD's Copy/Paste Detector (CPD) last year on a project. There was some code for EcmascriptLanguage support but I recall having to update GUI.java and repile the project to get it to work.

If you use ruby (or even have it on your system) you may want to try flay-js (flay plugin)

It may be worth checking out the coverage section in Google Chrome, relatively new feature: https://developers.google./web/updates/2017/04/devtools-release-notes#coverage

Find unused CSS and JS code with the new Coverage tab. When you load or run a page, the tab tells you how much code was used, versus how much was loaded. You can reduce the size of your pages by only shipping the code that you need.

发布评论

评论列表(0)

  1. 暂无评论