Cleaning up a large, legacy Java project

后端 未结 9 2250
抹茶落季
抹茶落季 2021-02-07 11:00

I\'ve been assigned to do some work on a huge Java project, and the influence of several iterations of developers is obvious. There is no standard coding style, formatting, nam

9条回答
  •  梦谈多话
    2021-02-07 11:47

    I also recoomend using the IDE's features to improve code quality. For eclipse this what i would do:

    In the preferences java > code style > formatter - define your own format and add it. after that right click the project and source < clean up. Choose sustom profile and configure. There are plenty of things you can do here like code formatting cleaning up imports converting legacy for loops into enhanced ones cleaning up unused code and many more.

    After that i would do the things other people here suggested as well like using checkstyle, pmd, findbugs and so on.

提交回复
热议问题