Java program for formatting code

Is there a program (Java program) for formatting code according to Java code conventions?

Is there an Ant task?

+4
source share
2 answers

Eclipse will automatically do this for you if you report it. or at least it will be very much. I doubt he would rename the variables to fit the coding standard.

Click on the properties for your project and view the options in the Java Code Style section.

You will need to open each file separately and save it though.

You can also install CheckStyle to enforce coding standards.

0
source

Source: https://habr.com/ru/post/1341791/


All Articles