JTerm icon indicating copy to clipboard operation
JTerm copied to clipboard

Which code conventions to use?

Open tzuntar opened this issue 5 years ago • 4 comments

Which code conventions to use?

I want to improve the code base quality a bit and have noticed that the conventions used are somewhat inconsistent. Sometimes the project style conventions are used but often the standard Java ones are used as well, especially when it comes to whitespace and the position of curly brackets. Which code conventions are to be used?

Also, which doc comments are preferred? The ones in SourceStyleGuide.md or JavaDoc?

tzuntar avatar Sep 07 '19 19:09 tzuntar

Hmm... use JavaDoc. I'm trying to remember why I even wrote the style guide in the first place since I ended up using JavaDoc 90% of the time anyways. Sorry for the confusion.

Sergix avatar Sep 07 '19 19:09 Sergix

I'll leave this open until the spec file is removed and the README is updated.

Sergix avatar Sep 07 '19 19:09 Sergix

OK, thanks for clarification. What about whitespace and curly brackets? Should I use the default "Java" style

private int something() {
    doSomething();
}

or follow the style guide, i.e.

private int something()
{
    doSomething();
}

tzuntar avatar Sep 07 '19 19:09 tzuntar

Java style. 👍🏼

Sergix avatar Sep 07 '19 19:09 Sergix