grpc / grpc/grpc-java

Conventions and style

Aperta
#1,653 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
12.1k
Fork
4k
Merge medio
2g 17h
PR unite (30g)
37

Descrizione

I've recently become an active contributor to the project and managed to have few of my PRs merged. My PRs received a lot of great feedback and good comments but also A LOT of convention/code style related ones. Everytime I receive one I feel really bad that I've wasted both mine and reviewer's time and only made whole review process longer by result. I tried really hard to improve in this area and conform to the coding standards but still noticeably failing at it and making nontrivial number of errors.

I really think that having conventions and pointing out inconsistencies in PRs is the right thing to do - please continue doing this - but I want to point out that we have two problems: tooling and style inconsistencies in existing code.

Regarding former, together with @ejona86 we tried to fix in https://github.com/google/styleguide/pull/115. Latter is more tricky and partially fixable by former by having cohesive conventions. I don't think we should create a massive "Fix style" type commit fixing all whitespaces and formatting because it'll only obfuscate git history but we need to agree which is the right convention with which we want to move forward and format every new code using it (case in point: [indentation after line break in method definition is different between two methods in the same file](https://github.com/grpc/grpc-java/blob/master/core/src/main/java/io/grpc/ServerInterceptors.java#L73-L93) )

One more time it'd like to emphasize that I'm not moaning about nitpicking but rather raising an issue which after solving will make lives better for both maintainers and contributors.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.