-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: contribute: Extend Reviewer Expectations with additional rules #83176
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -305,10 +305,27 @@ Reviewer Expectations | |
they address all non-blocking comments. PR authors should acknowledge every | ||
review comment in some way, even if it's just with an emoticon. | ||
|
||
- Reviewers shall be *clear* and *concise* what changes they are requesting when the | ||
- Style changes that the reviewer disagrees with but that are not documented as | ||
part of the project can be pointed out as non-blocking, but cannot constitute | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe add a link to them? |
||
a reason for a request for changes. The reviewer can optionally correct any | ||
potential inconsistencies in the tree, document the new guidelines or rules, | ||
Comment on lines
+310
to
+311
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't scale? We need the process to put more work on contributors, not maintainers, within reasons of course. This seems to suggest that we are happy with a PR being merged with stylistic issues/incoherent style and then we want another person to fix it separately. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in a galaxy far away, the following conversation was observed in a PR: Bob: hey, you are missing a comma there possible outcome:
In another galaxy... Bob: hey, you are missing a comma there Possible outcome:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We do assume that existing formatting and style of text of a file may be used as a guideline to enforce? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There's also this one: Bob: hey, you are missing a comma there There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
there are many scenarios, too many to list here, obviously this PR intent is to cover the odd cases, not the straightforward ones, your case above can be extended with a different outcome: Bob: hey, you are missing a comma there or Bob: hey, you are missing a comma there There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The above can exactly be said about reviewers, taking the whole project hostage with nitpicking and adhoc/made-up rules that are based on personal preferences. btw, I did not suggest closing PRs in rage is an accepted or welcome behavior. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This a bit vague but can be interpreted as: style guidelines cannot evolve without a corresponding, comprehensive and mass cleanup (and mass breakage of git blame/revert/cherry-pick). That would be too extreme. Getting consensus on coding styles is hard enough, I don't think the bar should be raised even higher and require a mass cleanup. We can survive with some past inconsistencies as long as the future direction is clear. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
That is true, and some instances that this nitpicking is how a PR can be stalled by reviewer in an attempt to gain time for providing "alternative" solution instead of helping with technical advice to reviewed one.
Never implied so, but no guideline against that, I think... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Thinking about it a bit more, that very specific bit can simply be dropped (and the rest of the sentence kept as is). That bit sounds like trying to give some "you go and do it yourself first" ammunition to the submitter in the naturally unbalanced "comma power struggle" between maintainer and submitter. Such ammunition is not necessary. I think the answer "there's no rule about these commas so you can't make me" is strong enough alone. PS: as a submitter, I would likely just add/remove commas as instructed and ask "how high?" I must jump but apparently everyone's different... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Small follow-up submitted: |
||
and then enforce them as part of the review. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Not par of the same review/PR though, or we will end up in a stalemate, PR doing something and another PR introducing guidelines that block the original PR. So I would change this to..
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No. If contributor does not agree they still are doing the change as requested; after PR gets merged they can then record an issue on style change and propose change to entire unit at once - that is sane way to do that, otherwise you and up with a unit that holds multiple styles and look like crap. That happens, because maintainers stay there and contributors come and go. What then? Maintainer is supposed to fix it, bring in the "original" style? Use the new one? Then which one? Either way maintainer looses time on something that random person does not agree on but is not willing to put time to change uniformly. I have several times people do change and never re-appear. What will happen is that we will have a lot of "style" issues logged in that authors will not follow afterwards, with no will from contributors to follow with change, and leaving code half done. |
||
|
||
- Whenever requesting style related changes, reviewers should be able to point | ||
out the corresponding guideline, rule or rationale in the project's | ||
documentation. This does not apply to certain types of requests for changes, | ||
notably those specific to the changes being submitted (e.g. the use of a | ||
particular data structure or the choice of locking primitives). | ||
|
||
- Reviewers shall be *clear* about what changes they are requesting when the | ||
"Request Changes" option is used. Requested changes shall be in the scope of | ||
the PR in question and following the contribution and style guidelines of the | ||
project. | ||
project. Furthermore, reviewers must be able to point back to the exact issues | ||
in the PR that triggered a request for changes. | ||
|
||
nashif marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- Reviewers should not request changes for issues which are automatically | ||
caught by CI, as this causes the pull request to remain blocked even after CI | ||
failures have been addressed and may unnecessarily delay it from being merged. | ||
|
||
- Reviewers shall not close a PR due to technical or structural disagreement. | ||
If requested changes cannot be resolved within the review process, the | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to have in the docs what could be a clear order of precedence in terms of styling. As a maintainer of a whole platform sometimes it is necessary to apply tree wide changes that may conflict with other areas. As an example, the styling used for functions may not be the best when you need to change a register.
The intention will be clarify the precedence between SoC, driver, subsystems and libraries areas. For instance, if a vendor maintain the drivers possibly he wants to keep same styling for that drivers. Besides that, people have many experiences and tastes and it is a difficult topic and precedence order on this could help.
This should state too what is the precedence order about maintainer and assignee to solve the conflicts. This could avoid to have people from other areas requesting changing on styling that they should not supposed to ask. I think it is important to write in a way to not create anarchy but to help and avoid conflict resolution.
For instance, what happen when the vendor maintainer open a PR which the assignee or reviewers don't like the style?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Existing code of a unit, if it keeps common style, is documentation of style itself.
There should be some trust in maintainers, as reviewers, that their are not acting in malicious ways, but rather try to represent project and are requesting a change because they need to keep the entire thing in some frames.
Vendors which are maintainers of their support code, i.e. drivers, should have precedence on style over maintainers of the area drivers are in as long as they do not cross the path of subsystem Maintainer. I do not care how, for example, NXP drivers look inside as long as they work correctly in context of API.
If there is a new contributor, creating new file in the area vendor is maintaining, vendor can impose style - because the vendor will be there for longer, represented by on person or another, you can not tell the same thing about a contributor.