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 Conventions #2

Closed
schauder opened this issue Oct 24, 2015 · 7 comments
Closed

Code Conventions #2

schauder opened this issue Oct 24, 2015 · 7 comments

Comments

@schauder
Copy link
Contributor

It would be nice to have some code conventions defined, to make it easier for non-core-committers to provide useful pull requests.

Ideally they would come with formatters/checkstyle configurations.

@sbrannen
Copy link
Member

Don't worry.

We will definitely having coding conventions in place once we get to the point where we are accepting pull requests.

At this time we are simply focusing on the functionality and feasibility of the prototype.

Since most of the code will likely be rewritten or thrown away, coding conventions are a moot point for the time being. 😉

@kcooney
Copy link
Member

kcooney commented Oct 24, 2015

JUnit moved to.the Google Java Style Guide, except we kept the indentation of existing files at four spaces.

See https://github.com/junit-team/junit/blob/master/CODING_STYLE.txt

This was referenced Oct 26, 2015
@nedtwigg
Copy link
Contributor

Whitespace is certainly not the most important part of a project, but if you put stylechecking into the build while the project is still young, then it ensures that your project history from will be clean of formatting noise so you can focus on the content. I submitted two PR's above:

  • the first enforces a style guide, using rules that closely match the exising style
  • the second is the same as the first, but with an extra commit to switch to the Google style

@nedtwigg
Copy link
Contributor

Saw this change in the README:

The goal of the prototype is to get feedback on the API. Focusing on code style, formatting and other details will distract the community's (and our) attention.

I agree that formatting is a minor concern, so I won't distract further after this comment. But the pull-requests I submitted to help with formatting now have a merge conflict because of a meaningless whitespace change.

As someone who doesn't care what style the code is in, but just wants to follow the evolution of the code, it's distracting to filter through formatting changes. The commit which introduced conflicts for the PRs also swapped the order of imports in several places, without actually changing what was imported.

Be regular and orderly in your life, so that you may be violent and original in your work.
- Gustave Flaubert

Your code already has a style, but without tools us humans are going to be inconsistent and distract from the meaning of the actual code. Which isn't a big deal, but I'm still gonna preach for using the tools that we have to get rid of that noise.

Can't wait to use what you guys come up with 👍

@bechte
Copy link
Contributor

bechte commented Nov 1, 2015

Yeah, sorry about that. We didn't use spotless at this time. Now we are reformatting with the common code style before each commit to avoid this in the future. Still, this is still prototyping and we are focussing features. I agree that it is not easy to contribute right now, but it will be in the future when we have a early alpha. Thanks for your feedback.

@jlink
Copy link
Contributor

jlink commented Nov 7, 2015

Since the spotless config (Eclipse formatter xml) is now checked in and enforced in the build I'll close this issue.

@jlink jlink closed this as completed Nov 7, 2015
sbrannen added a commit that referenced this issue Jan 22, 2019
sbrannen added a commit that referenced this issue Jan 22, 2019
marcphilipp added a commit that referenced this issue May 29, 2019
bjmi added a commit to bjmi/junit5 that referenced this issue Dec 8, 2023
* Test AutoCloseExtension
* Register extension as stateless

Signed-off-by: Björn Michael <b.michael@gmx.de>
bjmi added a commit to bjmi/junit5 that referenced this issue Dec 27, 2023
* Test AutoCloseExtension
* Register extension as stateless

Signed-off-by: Björn Michael <b.michael@gmx.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants