openwayback icon indicating copy to clipboard operation
openwayback copied to clipboard

Add style guide

Open johnerikhalse opened this issue 9 years ago • 4 comments

There should be a guide for coding style on the wiki. This style should preferably be enforced in the build, but since that requires a lot of changes in the code, the first step should be to report style violations.

johnerikhalse avatar Oct 23 '15 11:10 johnerikhalse

I have added a style guide. Consider it as a work in progress. Please discuss and enhance it. https://github.com/iipc/openwayback/wiki/Style-guide

johnerikhalse avatar Oct 27 '15 08:10 johnerikhalse

I'm OK with the current draft. The only point I'd question is

All classes and methods should have Javadoc comments.

That is a bit on the optimistic side. Perhaps a slightly less ambitious clause would be warranted

All classes must have a Javadoc comment. All public and protected methods should have a Javadoc comment. The use of Javadoc comments for other methods is encouraged, especially if they are more than 5 lines long.

kris-sigur avatar Oct 27 '15 10:10 kris-sigur

I think these are sensible conventions in the current draft. I also think the more specific clause about Javadoc comments would be helpful to include.

ldko avatar Oct 28 '15 22:10 ldko

I agree. Document is updated. I also added a line about avoiding the @author tag. I think git blame is a better alternative.

johnerikhalse avatar Oct 29 '15 12:10 johnerikhalse