[comixed-dev] Re: Code formatting for Java and Typescript

  • From: "Darryl L. Pierce" <mcpierce@xxxxxxxxx>
  • To: comixed-dev@xxxxxxxxxxxxx
  • Date: Wed, 20 Nov 2019 06:34:53 -0500

Done and done. I've reformatted all of the Java code to create a baseline
for us to use.

On Wed, Nov 20, 2019 at 4:34 AM João Miguel Côrte-Real França Pereira <
jmcrfp@xxxxxxxxx> wrote:

It's ok by me.
Maybe you could do a full code reformatting now, so that we don't get
reformatting withing normal commits, that really makes it hard to review.

On Wed, Nov 20, 2019 at 3:02 AM Darryl L. Pierce <mcpierce@xxxxxxxxx>
wrote:

To make things easier, I'd like to introduce some form of automated code
formatting for Java.

We already a configuration in the comixed-frontend submodule for use by
Prettier on Typescript code.

I'm looking currently at maven-git-code-format for use on the Java side
of the project. WIth it we can enforce the Google Java formatting standard
on the code. To format code we only need to do:

  $ mvn git-code-format:format-code

from the root and it formats the entire project. So that way we can all
work locally with whatever code convention we prefer. But when checking in
the code, we can run this plugin from the command line (or if you use
IntelliJ like I do you can just enable the google-java-format plugin) and
the code will be purely changes and not contain any reformatting-only lines.

What are everybody's thoughts on this?

--
Darryl L. Pierce <mcpierce@xxxxxxxxx>
"Le centre du monde est partout." - Blaise Pascal
"Let's try and find some point of transcendence and leap together." -
Gord Downie



-- 
Darryl L. Pierce <mcpierce@xxxxxxxxx>
"Le centre du monde est partout." - Blaise Pascal
"Let's try and find some point of transcendence and leap together." - Gord
Downie

Other related posts: