Skip to content
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

Code styling seems inconsistent? #5075

Closed
poikilotherm opened this Issue Sep 21, 2018 · 5 comments

Comments

Projects
None yet
5 participants
@poikilotherm
Copy link
Contributor

poikilotherm commented Sep 21, 2018

Dear all,

currently being active working on patches and stuff, I wondered about the style conventions you guys use and how I should write my code to be in line with your code of conduct. Example: indentation. I just found http://guides.dataverse.org/en/latest/developers/coding-style.html, which is not very precise/elaborated on that.

I would really enjoy something more sophisticated (like how you would like to see braces been set, etc)...

Also, there seem to be issues with different settings from different developers. An example from my IDEA IDE, showing the Maven pom.xml:
grafik
But I also saw indentation hell in some Java code files...

Maybe some tooling could help with this? E.g. CheckStyle, which can be configured as needed, starting with indentation and maybe add more stuff down the road? This is also available as simple to use Maven plugin...

@pameyer

This comment has been minimized.

Copy link
Contributor

pameyer commented Sep 21, 2018

It looks like it hasn't hit a release yet, but doc/sphinx-guides/source/developers/coding-style.rst may have some more information. I've done a little with astyle (although I didn't come up with a satisfactory solution to the "just reformat the code you changed, not the whole file" recommendation).

But regarding the question - the code styling seems inconsistent because it is inconsistent.

@pdurbin

This comment has been minimized.

Copy link
Member

pdurbin commented Sep 22, 2018

Thanks, @pameyer , yes I was going to point out that your pull request #4995 helped explain about our preferred curly brace placement. It's been merged already and can be seen here for now: http://guides.dataverse.org/en/4990-ec2-ansible-scripting/developers/coding-style.html#braces-placement

@pdurbin pdurbin referenced this issue Sep 24, 2018

Merged

4990 ec2 ansible scripting #5063

3 of 5 tasks complete

@poikilotherm poikilotherm referenced this issue Sep 25, 2018

Closed

#5075: add CheckStyle checking #5094

0 of 1 task complete
@pdurbin

This comment has been minimized.

Copy link
Member

pdurbin commented Sep 25, 2018

@poikilotherm thanks for pull request #5094! I'll move it to code review at "Community Dev" at https://waffle.io/IQSS/dataverse but like you said in the pull request we probably won't want to merge it exactly as is so there's a good chance we'll send it back to you with questions or create our own config based on what you've demonstrated in the pull request.

@poikilotherm

This comment has been minimized.

Copy link
Contributor Author

poikilotherm commented Sep 26, 2018

IMHO you should cover as many aspects as possible... The sooner you get a consistent styling and the sooner you get people to document the code they are writting the better. But that's just my 2 cents. 😉

@pdurbin

This comment has been minimized.

Copy link
Member

pdurbin commented Sep 27, 2018

@poikilotherm I think what we need is more of a baby step at this point so I just closed your pull request #5094 in favor of pull request #5106 which is smaller in scope and doesn't fail the build. Code review from all is welcome!

@pdurbin pdurbin removed their assignment Sep 27, 2018

pdurbin added a commit that referenced this issue Sep 27, 2018

specify 4 spaces for Java #5075
We should add this to Checkstyle too.

pdurbin added a commit that referenced this issue Sep 27, 2018

@kcondon kcondon self-assigned this Sep 28, 2018

kcondon added a commit that referenced this issue Sep 28, 2018

Merge pull request #5106 from IQSS/5075-add-checkstyle
add checkstyle (no tabs, left curly) and usage docs #5075

@kcondon kcondon closed this Sep 28, 2018

@kcondon kcondon removed the Status: QA label Sep 28, 2018

qqmyers added a commit to QualitativeDataRepository/dataverse that referenced this issue Sep 28, 2018

add checkstyle (no tabs, left curly) and usage docs IQSS#5075
Conflicts:
	doc/sphinx-guides/source/developers/coding-style.rst
	pom.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.