grpc / grpc/grpc-java

Conventions and style

Open
#1,653 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
12.1k
Forks
4k
Avg merge
2d 17h
Merged PRs (30d)
37

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.