Are there any tools out there to refactor the coding-style of a java code base?

前端 未结 6 1235
时光说笑
时光说笑 2021-02-06 06:57

Normally, when doing some work on an existing project, I would just go with whatever style is already established in the code base. But our team has to maintain multiple small t

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-06 07:52

    I was looking for similar, or even more advanced tool. I was trying to implement design metrics, which are very context dependent. I found some tools, which are commercial and quite expensive like Ndepend and reflectk. I also found some open source tools, which are stalle like Hammurapi. There are also tools like Checkstyle, Findbugs and PMD, which can be used for very simple use cases. The best tool I found was MoDisco. Its based on Eclipse EMF, allows to generate model of your code and than do some querying or transformations (using M2M tools). The only problem I had was that it is quite slow for standard ~20k LOC projects. Give it a try, maybe for your use case it will suffice.

提交回复
热议问题