New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Code Formatter #85
Conversation
WIP: This depends on an other maven artifact scijava-coding-style which is not released yet.
Before merge: Please move this dependency https://github.com/maarzt/scijava-coding-style to the SciJava organization, "Travisify" and release. And then change the WIP commit to point to the correct version. |
@maarzt wrote:
Since you're a member of the |
@imagejan wrote
I tried, but github tells me, that I don't have permission to create a repository in the scijava organization :-/ |
Alright, sorry, my guess was wrong. For the SciJava org, repository creation is disabled for Members. I see two ways out of this:
While I technically can put either of these in action, I'd like to ask @ctrueden for his opinion, because I don't want to mess with the permissions of such an important organization 🙂 Alternatively, @maarzt, you can make me a co-admin of |
It's fine to allow creation of new repositories in the scijava org. As long as everyone does it sparingly! |
Alright, I changed the |
@imagejan I moved the repository to the scijava organization. We can now work on the pom. |
@maarzt most of the changes I had in mind you covered in scijava/scijava-coding-style@c9dd725 already. The remaining things are:
I did this in scijava/scijava-coding-style#1, feel free to merge or add changes. Next steps:
|
For some reason I cannot activate |
Nope. travisify.sh -f
And https://travis-ci.com/scijava/scijava-coding-style says "We couldn't find the repository Let's try again tomorrow. If it still doesn't work, contact Travis support? Or we can just punt and activate it on travis-ci.org instead. I've had to do that for a couple of other repositories in past months. |
I tried again and still wasn't able to activate on travis-ci.com, so now activated it on travis-ci.org instead. The build reports to have failed (there seem to have been issues with the gpg encryption?!), but actually was built and deployed: |
The issue with scijava-coding-style was with decrypting the GPG key—which is not used anyway when deploying to the SciJava Maven repository. I have re-Travisified the repository, which has fixed the issue, in case we ever switch to OSS Sonatype in the future (since OSS Sonatype requires GPG signing). The build failed again due to the switch to maven.scijava.org, but I will have that tidied up shortly. |
Regarding the scijava-coding-style repository, all is well now. I have cut the 1.0.0 release, which if all goes well will build and deploy momentarily. (Edit: It did not deploy successfully, due to some misconfiguration of maven.scijava.org. I'm working on it. Will rebuild the tag once fixed.) This PR still needs a little TLC, however:
|
Finally got scijava-coding-style 1.0.0 released. @maarzt I decided to redo this patch in pom-scijava-base myself. Merged to master now. Thanks so much for working on it! 👍 I will test it along with pom-scijava melting-pot work later this week, before releasing pom-scijava-base 7.0.0, and correct any issues with it. Though if anyone else wants to test it as well, please do. |
This PR configures a maven code format plugin in
pom-scijava
. A maven project that depends onpom-scijava
can be formatted according to ImageJ Coding Style by simply calling:This will use the Eclipse coding style configuration files in this (not yet released) maven artifact:
https://github.com/scijava/scijava-coding-style
It can also be set up to use ImgLib2 or SCIFIO coding style by stetting by setting the maven property to "imglib2" or "scifio" ("imagej" is the default value):
Sorting of java imports is supported as well: