Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Coding guidelines #72

Open
Christian24 opened this issue Aug 15, 2018 · 14 comments
Open

Coding guidelines #72

Christian24 opened this issue Aug 15, 2018 · 14 comments

Comments

@Christian24
Copy link
Contributor

Right now we do not have coding guidelines. I created a first draft in our wiki here: https://github.com/viadee/vPAV/wiki/Coding-guidelines

It's a living document, so please join the discussion. I think we should also name a Code Formatter that every contributor should use.

@fkoehne
Copy link
Contributor

fkoehne commented Aug 15, 2018

Definately a good idea. But I don't think we should discuss and document this locally. I would prefer to just provide a pointer to an existing set of guidelines such as these https://google.github.io/styleguide/javaguide.html.

@Christian24
Copy link
Contributor Author

I agree. However, I am afraid we would put too much of a burden on contributing. If I want to contribute I will probably not read the entire style guide (if it is that long).

Maybe we should (only) refer to the formatting plugins: https://github.com/google/google-java-format

@fkoehne
Copy link
Contributor

fkoehne commented Aug 16, 2018

Let's give it a try. :)

@Christian24
Copy link
Contributor Author

I updated the coding guidelines to reflect the usage of the Google Java Style Guide. And I tried the IntelliJ plugin and am very pleased with it.

We need to reformat the existing codebase though.

@fkoehne
Copy link
Contributor

fkoehne commented Aug 16, 2018

... with the maven plugin?

@Christian24
Copy link
Contributor Author

Have you tried any of the three?

@fkoehne
Copy link
Contributor

fkoehne commented Aug 16, 2018

Not yet - sorry.

@chrlembeck
Copy link
Contributor

If you want to customize your Java Style Guide, there is another maven plugin based on the eclipse code formatter: https://github.com/revelc/formatter-maven-plugin

@chrlembeck chrlembeck reopened this Aug 28, 2018
@Christian24 Christian24 self-assigned this Sep 18, 2018
@Christian24
Copy link
Contributor Author

I have just pushed an updated contributing branch with updated contributing guidelines and Java code formatter applied to all source files.

What do you think? To me it looks a bit like the indention is really small.

@sdibernardo
Copy link
Collaborator

I have to agree that I am not a fan of the indent being that small. Besides that, I have not found any other concerns

@Christian24
Copy link
Contributor Author

Well, I had a second thought on this: If the indentation is this small, maybe developers no longer nest this deeply. :) Maybe we should just run with it for now, since so far the advantage of properly formatted code by far outweighs the inconvenience of not being able to nest so deeply so easily for me. If we come across a better formatter, we can still switch later on.

@fkoehne
Copy link
Contributor

fkoehne commented Sep 19, 2018

Sure - go for it. Please make sure that the setup is easily reproducable with both IDEs at hand and well documented :).

@Christian24
Copy link
Contributor Author

I would argue that Google did that for us already: https://github.com/google/google-java-format

@fkoehne
Copy link
Contributor

fkoehne commented Sep 19, 2018

Well - yes. But that was not the point I wanted to make. Let's make noticing this and hopping on as a contributor as easy as we can.

@sdibernardo sdibernardo added this to the 3.1.0 milestone Jul 1, 2020
@TamaraGunkel TamaraGunkel self-assigned this Jul 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants