grpc / grpc/grpc-java

Conventions and style

Offen
#1,653 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
12.1k
Forks
4k
Ø Merge
2 T. 17 Std.
Gemergte PRs (30 T.)
37

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start by reviewing the styleguide pull request 115 and the inconsistency cited in core/src/main/java/io/grpc/ServerInterceptors.java, lines 73-93. Determine whether the project has agreed conventions or tooling requirements; done would mean a documented direction for new code and an agreed approach that avoids a repository-wide history-obscuring formatting commit.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
developer-experience, tooling
Issue-Typ
Refactoring
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.