Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

OpenSource Code Cleaner

 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to clean up my source code. I am looking for a tool that read all .java files of given folder and its subfolders, and perform following operations
(i) If length of commented block is more then 10 lines, remove it
(ii) If SOP exist in catch block, replace it with e.printStackTrace();
(iii) Remove all SOPs

Is there any OpenSouce Tool for this?
 
pradeep jaladi
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

So far as per my knowledge there is no such a tool. You need to write your own program which reads the file one by one. and search for /* & */. if the length betwen them is more then 10 lines simple remove them. You can check for the remaining conditions also.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic