Cleaning up a large, legacy Java project

后端 未结 9 2246
抹茶落季
抹茶落季 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:33

    My suggestion would be add something like Checkstyle to your build system. It's hard to get management to buy into the idea of doing a complete overhaul all at once. Design what you think are a good set of style guidelines and implement them in Checkstyle and add it to your build.

    Then, require that all new check-in of code doesn't break Checkstyle. That means whenever you work on a class you'll bring it up to standards. It won't seem you're doing any extra work at all if it's just a little something you have to do before committing for a while.

    Also, checkstyle plugins exist for Eclipse.

提交回复
热议问题