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

  • From: João Miguel Côrte-Real França Pereira <jmcrfp@xxxxxxxxx>
  • To: comixed-dev@xxxxxxxxxxxxx
  • Date: Sun, 24 Nov 2019 11:19:21 +0000

I've been playing a bit more with actions, and it's possible to trigger on
push and pull requests.
I't also possible to publish to the release tab:
https://github.com/jmcrfp/comixed/releases
This example trigger on a push of a specific type of tag
https://github.com/jmcrfp/comixed/blob/develop/.github/workflows/deploy.yml
I still can't find a way to specify the version in asset_path, so the zip
file will probably will have a fixed name.
Do you think I should pursue this? Or are you happy with travis?


On Sat, Nov 23, 2019 at 5:03 PM Darryl L. Pierce <mcpierce@xxxxxxxxx> wrote:

I was able to get the Travis CI build working again

I spent a few hours this morning pouring over Github's Actions and could
not find anything that would what I wanted; i.e., build the develop after
each merge into develop. But the best I could get was for it to put the
artifact down in the Actions view, which isn't where users will go looking
for a release.

I appreciate the work you did to get those actions running quickly. Sadly,
Github just doesn't do what we need to get things out there for people to
download.

On Sat, Nov 23, 2019 at 7:08 AM João Miguel Côrte-Real França Pereira <
jmcrfp@xxxxxxxxx> wrote:

Thanks, I also don't know but I should because I work as devops :p, so I
will investigate and improve it :)

On Sat, Nov 23, 2019, 11:38 Darryl L. Pierce <mcpierce@xxxxxxxxx> wrote:

I just approved and merged it. But I'll plead ignorance on it. Right now
the configuration will only run the build, correct? How do we modify it to
also 1) provide a build status on the code tab and 2) push the release
artifact to the Github page.

On Fri, Nov 22, 2019 at 10:38 AM João Miguel Côrte-Real França Pereira <
jmcrfp@xxxxxxxxx> wrote:

I've create the PR with the action, it took 15 minutes to build in the
action instead of 22min in travis

On Fri, Nov 22, 2019 at 2:56 PM Darryl L. Pierce <mcpierce@xxxxxxxxx>
wrote:

I'm game for that! :D

On Fri, Nov 22, 2019 at 9:40 AM João Miguel Côrte-Real França Pereira <
jmcrfp@xxxxxxxxx> wrote:

Sure, as soon as I arrive home I will do it.

Maybe we should try github actions instead of travis, it's the new
thing ;)

On Fri, Nov 22, 2019 at 2:28 PM Darryl L. Pierce <mcpierce@xxxxxxxxx>
wrote:

It looks like the importer code didn't get formatted since that
submodule's currently commented out in the main pom.xml file. So, yeah,
please uncomment that and push up a PR for that and the code 
reformatting
when you can and we'll get that merged.

Can you also copy into that submodule the new logback-test.xml file
I've added to other submodules? This is to throttle the logging output 
on
Travis since our new project's builds are failing there due to excessive
output (which is weird because the same code doesn't fail on my personal
Travis builds on the same site).

On Thu, Nov 21, 2019 at 7:29 PM João Miguel Côrte-Real França
Pereira <jmcrfp@xxxxxxxxx> wrote:

The comixed-importer didn't get to be formated. Do you want me to
do it and push it?

Btw what are your thoughts on put it on sonarcloud also?

A quarta, 20/11/2019, 14:06, João Miguel Côrte-Real França Pereira <
jmcrfp@xxxxxxxxx> escreveu:

Nice!

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

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



--
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



--
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: