-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add maintainer guidelines #9315
Conversation
Previous comments from discussion on splinepad are below: unnamed: any ideas how to concret "good reasons"? unnamed: do 1.3 and 1.4 target the same "issue"? unnamed: 1.5: does this mean transperency on how to reproduce and est this one PR? e.g., if a special setup is needed, how to set this up? maybe we can concretise this point unnamed: 2.3: guess we need to practice better here and might introduce sme toolse in future? unnamed: maybe add some cross-references/links to the wiki, further explaining doc conventions, for example ... Thomas: good reasons -> present striking/justifying arguments |
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.
unnamed: maybe add some cross-references/links to the wiki, further explaining doc conventions, for example ...
+1
MAINTAINING.md
Outdated
1.2 Do the concepts used by the PR make sense? | ||
1.3 Does the PR break with existing concepts? | ||
1.4 Is the structure of the PR itself valid? | ||
1.5 Are the testing criteria clear? |
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.
unnamed: 1.5: does this mean transperency on how to reproduce and est this one PR? e.g., if a special setup is needed, how to set this up? maybe we can concretise this point
I agree with this comment (it might be my own, but I'm not sure). IMHO this point should not mean "Contributor, please provide a test applications or scripted test case" (unless they are really straight forward or prove that the PR actually improves upon the current code base or because the contributor wants to). This could (and should) e.g. interpreteted as that the API (inkl. documentation) is clear enough, that a third party can implement comprehensive tests (ideally black box) on their own. Or in case of a bug fix of course: A description how to reproduce the bug and how the PR fixes that.
And yes, this is a diversion from our current handling of tests.
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.
Perhaps it could read, "Are there clear and adequate instructions on how to test the PR or reproduce the bug" and perhaps 1.6, "Are any design and/or API changes clearly documented"?
It seems that these points are phrased such that they are open to interpretation - in other words, there's a certain degree of trust placed in the Maintainer. Which I think is appropriate.
Regarding "good" reasons: in law you might define this as something like "a reasonable person, skilled in the art, would believe that the reason gives sufficient justification". A "reasonable person" is a legal fiction for how the community believes a typical personal in that position ought to behave. A person skilled in the art (which is programming in this case) is a similar legal fiction of a typical person with normal skills of a professional in that field (is not incompetent and is not a genius). Concepts like "reasonable person" are a convenient way of dealing with hard to define problems in imperative language by letting the community deal with instead. This is a bit verbose for the document, but it might be a conceptual starting point for deciding how to word it. |
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've added some comments of my own both as placeholders for myself and in response to/to stimulate discussion. My plan is to wait until the end of the week and then make changes after discussion
MAINTAINING.md
Outdated
1.2 Do the concepts used by the PR make sense? | ||
1.3 Does the PR break with existing concepts? | ||
1.4 Is the structure of the PR itself valid? | ||
1.5 Are the testing criteria clear? |
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.
Perhaps it could read, "Are there clear and adequate instructions on how to test the PR or reproduce the bug" and perhaps 1.6, "Are any design and/or API changes clearly documented"?
It seems that these points are phrased such that they are open to interpretation - in other words, there's a certain degree of trust placed in the Maintainer. Which I think is appropriate.
MAINTAINING.md
Outdated
|
||
## 1. - Review the fundaments | ||
|
||
1.1 Does the reasoning for this PR make sense? |
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.
1.0 Does it compile and run as expected in a basic fashion?
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.
IMO the 1.0 aspect should be closer to 1.5 and not next to the conceptual question
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.
ok cool. So 1.6 could be "Do the tests run and pass?"
MAINTAINING.md
Outdated
2.4 Check for API compliance | ||
2.5 Check for consistent error handling | ||
2.6 Check scope of variables and functions | ||
2.7 Check for programming errors |
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.
Perhaps this could be phrased as "syntactical, semantical or logical errors, particularly ones that may lead to runtime errors"
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.
+1 for "Check for syntactical, semantical or logical errors"
MAINTAINING.md
Outdated
## Detailed Rationales, Explanations, and Examples | ||
|
||
WIP: extend this! | ||
|
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.
Note to self: language needs to be made more formal in places
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 have the impression that following sections should be somehow polished (e.g., "cppcheck should find this, right?)")
MAINTAINING.md
Outdated
### On 1. | ||
|
||
#### On 1.3 | ||
- does this code properly maintain the Git history of previous contributions? (note by Martine: a PR can't change the Git history of the mainline repo => no force push possible, but maybe something else is meant here, if so, please specify) |
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.
Change to 1.6 and clarify that this means to keep the Git history of multiple authors if multiple authors are involved
MAINTAINING.md
Outdated
- can all code paths be actually reached? | ||
- e.g. always `true/false` conditions | ||
- are all critical sections (`lock/unlock`, `acquire/release`, ...) always | ||
closed on every code path? |
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.
Do we use any code coverage tools at the moment?
MAINTAINING.md
Outdated
baseline on things that should be checked. | ||
|
||
Note: Any of the items in this list might be skipped, if **good** reasons are presented. | ||
|
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.
"Good reasons" could be replaced by "reasons that are clearly and logically articulated"
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.
+1
MAINTAINING.md
Outdated
|
||
|
||
## 3. - Test the PR | ||
Run tests to verify the correct behavior (see 1.5), or present **good** reasons |
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.
As above wrt use of the word "good"
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.
Also, would it be worth mentioning that testing should be done not just on native, but also a couple of different boards incl. our reference board?
MAINTAINING.md
Outdated
4.1 Check for sufficient high-level (module-level) documentation | ||
4.2 Verify function level documentation | ||
4.3 Are critical/hard to understand parts in the code documented? | ||
4.4 Check coding style (w.r.t. the coding conventions) |
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.
Hyperlink to coding conventions
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.
Maybe also link best practices?
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 think this should be moved to part 2. "Review the code line-by-line". I don't think reviewing code that doesn't follow coding conventions is possible. And it's easy to say: your contribution is not compliant with RIOT coding conventions or please run uncrustify.
I would also rename this part "Review documentation" since it's mostly related to this.
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 disagree with that. Yes, coding style is important and that's why it appears in this list in the first place and yes, checking coding style is easy. But it doesn't make sense to comment on coding style if the overall concept of the PR doesn't make any sense. Imagine there is a new PR by a new contributor and you go at it comment on all the coding style issues. Then you (or someone else) is looking what the now most beautiful code is actually doing, and realize it's actually total bullshit. Either, the contributor was already annoyed by your nitpickyness and now is even more annoyed that close the PR for valid reasons or they diligently followed your instructions and you wasted the contributor's and your time, because the PR isn't any good. The PR should be well understood (2 and 4.1-3) and tested (3) before any comments on coding style are made.
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.
(+ @jia200x work on automating uncrustify
should reduce the need to comment on any glaring coding style issues ;-))
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.
But it doesn't make sense to comment on coding style if the overall concept of the PR doesn't make any sense
Part 2 is not on overall concepts but rather on code, that's why coding style should go there.
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.
Okay, yes that was my mistake. 2 is about code correctness, which groups it rather with (3) than with 4.1-3. But my point stands, that the subjective* code style should take no precedence over the objective code correctness and concepts.
- Yes there is a document that describes the rules we agreed upon for style. Nevertheless, these rules are still based on subjective opinion which a contributor might not share (at least for their day to day work) but needs to adapt to.
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.
@aabadie basically I understand the reasoning re efficiency of reviewing. Uncrustifying code as a "first check" is low on maintaining time and people should have done this anyway. Also, sometimes people submit something where the code guidelines are simply not followed which makes it really difficult/feel rather futile to review. It sounds like this is where you're coming from here? I would say, that in a particular case, it might be judicious to deviate from these guidelines. If someone submits something which is just difficult to review because it's really poor, then of course it would be the maintainer's freedom to exercise good judgement and say, "please clean this up before reviewing". Maybe giving some general guidance as to how, for example run uncrustify or whatever else.
IMO, as a broad generalization (i.e. not taking into account these individual cases), the general philosophy/flow of reviews should be high level -> details. Reason being, that if we do code review, and then the higher level structure of the code or some other design aspects need to be changed, we'll have to do code review again anyway. So, we'll always have to do that code review once (whether it comes first or last), but we'll have to do it twice if design aspects need changing.
I would say that section 2. might be renamed "review design of code" or something like that.
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.
Also, sometimes people submit something where the code guidelines are simply not followed which makes it really difficult/feel rather futile to review. It sounds like this is where you're coming from here?
This is exactly what I have in mind. Why starting to review a code (line-by-line) if it doesn't follow the basic coding conventions of RIOT ? In any case, the contributor will have to, at least, uncrustify it, which might totally change the diff. And previous comments will becomes harder to track via github. Here I make the assumption that several people can review at different moment and also that another pass of review will raise other comments which is generally the case).
So I won't talk of code style in the document, but rather coding conventions and again move it to "review code line-by-line". Maybe this should be done even before looking at the code design. Why ? because this ensures that the contributions "looks like" the existing RIOT's code. And maintainers are used to look at this code, you can better concentrate on the real code design/efficiency problems.
Maybe giving some general guidance as to how, for example run uncrustify or whatever else.
This would be very useful of course. And should be added to the contributing guidelines.
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.
Would be good to differentiate between "coding style" (subjective) and "coding conventions" (absolute). Also to suggest that the placement of applying of "coding conventions" in practice depends on whether the PR comes in in a reviewable state with respect to code cleanliness.
@ZetaR60 my feeling is that, as a set of guidelines for people to use individually, some fairly specific guidance would be appropriate in this respect... maybe "a reasonably competent person" and a slant towards community discussion about this point might not be so helpful for each one person. What do you think of the suggestion made in the review comments? |
@danpetry I guess my point is that some of these criteria (esp. "good reasons") are sufficiently complex and organic that making them explicit in formal language is infeasible. There may be "reasons that are clearly and logically articulated" that are also unsuitable, because they are not "good reasons" according to unspoken community standards. I think there are two approaches to this: law has recognized this problem and has specific formal tools for handling it ("reasonable person" tests), or you might leave the language loose with the implication of more complex criteria outside of the guidelines document (I think "good reasons" actually does pretty well for this approach). It may be unhelpful of me to bring up this complex issue though, so if you feel you have an adequate solution then feel free to ignore these suggestions. I just have an interest the nature of logic and formal language and I don't get to use it often. |
MAINTAINING.md
Outdated
2.5 Check for consistent error handling | ||
2.6 Check scope of variables and functions | ||
2.7 Check for programming errors | ||
2.8 Check for code efficiency |
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.
Though I don't know which efficiency is meant here, that point seems a bit generic to me. Above was already mentioned the code duplication or memory efficiency so this refers to run efficient programming or run time efficiency? Do we want to mention that?
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.
Yep that sounds like it, could replace "code efficiency" with "run time efficiency".
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'd be careful not to engage in efficiency discussions too early. If the code runs, efficiency is something that can be improved later.
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.
Hmm yeah. I guess with this point, it's a balance. Could be phrased, "check that code doesn't have any obvious, unnecessary inefficiencies"? I.e. we're checking here for things that are plain wrong, eg copying a whole struct to a function instead of handing a pointer?
The rule of thumb could be, things that could be improved without changing the overall design of the code?
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.
We should com up with and point to a document defining some best-practices.
There are things that we'd do differently than if we'd not be in tight embedded space.
E.g., if docs specify that argument three needs to point to a buffer that can hold N bytes, we only "assert()" whether the pointer is NULL instead of returning an error at runtime for production builds. That goes against safety / reliability best practices for any serious C development on "real" computers, but is necessary for us in order to keep code size down.
Maybe add something like "(See best practices here: TBD)" would make sense?
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.
"(See best practices here: TBD)"
I've just seen the best practices wiki entry that @PeterKietzmann linked. Down the line, that should have an "efficiency" part that we could link to.
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.
+1 for developing the "best practices". This could be a useful focal point to develop our shared understanding of design priorities
MAINTAINING.md
Outdated
- `int/unsigned` is only 16-bit on msp430 and avr8... | ||
|
||
#### On 2.8 | ||
- make sure we are not wasting any memory trough inefficient coding: |
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.
through
MAINTAINING.md
Outdated
int bar(foo_t v) { | ||
int abc = v; | ||
... | ||
} |
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'm wondering if such concrete examples should rather go to the coding conventions or best practices
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.
Yeah that sounds appropriate to me. That way, developers can also benefit from them. Perhaps all "detailed rationale" stuff could, rather than being here, be additions to our current coding conventions/best practices, for this reason? @haukepetersen any opinion?
MAINTAINING.md
Outdated
(1.7 Is the PR a duplicate of another PR?) | ||
|
||
|
||
## 2. - Review the code (line-by-line) |
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.
How many of these checks could be automated?
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.
Maybe we can put a note saying that the checks are in the process of/should progressively be automated? Using Cochinelle? And a similar note in section 4.4 about uncrustify?
MAINTAINING.md
Outdated
|
||
## 4. - Review code style and documentation | ||
|
||
4.1 Check for sufficient high-level (module-level) documentation |
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.
+1 here. No module-level docs means nobody will be able to find it.
I have a general comment regarding the document: it's missing behavioural guidelines to maintainers/reviewers. It would be nice to add a paragraph at the beginning explaining several things:
And there might be other things to add that I miss. |
MAINTAINING.md
Outdated
1.1 Does the reasoning for this PR make sense? | ||
1.2 Do the concepts used by the PR make sense? | ||
1.3 Does the PR break with existing concepts? | ||
1.4 Is the structure of the PR itself valid? |
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.
Having not reviewed that much yet, I'm not sure what this means. Does this mean e.g. not combining completely unrelated contributions, or half-contributions, and that kind of thing?
MAINTAINING.md
Outdated
|
||
|
||
## 3. - Test the PR | ||
Run tests to verify the correct behavior (see 1.5), or present **good** reasons |
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.
Also, would it be worth mentioning that testing should be done not just on native, but also a couple of different boards incl. our reference board?
MAINTAINING.md
Outdated
1.5 Are the testing criteria clear? | ||
(1.6 Does this PR respect the rights of previous authors?) | ||
(1.7 Is the PR a duplicate of another PR?) | ||
|
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.
Is the solution presented in the PR as simple as possible to satisfy the requirements, but no simpler? [link to Einstein quote]
MAINTAINING.md
Outdated
1.5 Are the testing criteria clear? | ||
(1.6 Does this PR respect the rights of previous authors?) | ||
(1.7 Is the PR a duplicate of another PR?) | ||
|
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.
1.x Are the requirements and design goals for the PR clearly thought out and clearly expressed?
MAINTAINING.md
Outdated
2.5 Check for consistent error handling | ||
2.6 Check scope of variables and functions | ||
2.7 Check for programming errors | ||
2.8 Check for code efficiency |
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.
+1 for developing the "best practices". This could be a useful focal point to develop our shared understanding of design priorities
MAINTAINING.md
Outdated
in this order. This list is however not exhaustive and defines a rather minimal | ||
baseline on things that should be checked. | ||
|
||
Note: Any of the items in this list might be skipped, if **good** reasons are presented. |
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.
Futher note: this is a working document and any changes/discussions/etc are encouraged, via PRs raised against the document, where discussions on the point can be undertaken
Should we add best practices on how to communicate, and the actual procedures? I'd rather not see "be nice! don't be racist!" (e.g., not duplicate the CoC), but things like "acknowledge replies to concerns (short "ok!" is fine")", "when done reviewing, write ACK, but mention if review was only of a part, e.g., "untested ACK." or "ACK for coding style, did not think about architecture"". Or is that out of scope? |
(or out of scope of this initial version). |
Agree with "non-technical guidelines". Would add:
|
I have made the changes suggested. Some notes
|
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.
@danpetry, the new items content is good. Maybe you could split the lines to make them fit in 80 characters line length ?
MAINTAINING.md
Outdated
The following list is not exhaustive and addresses the coding issues we have regularly seen in the past. In particular, check that the [Best Practices for RIOT Programming](https://github.com/RIOT-OS/RIOT/wiki/Best-Practice-for-RIOT-Programming) are followed. These checks can be aided (but not replaced) by a tool such as Coccinelle, using the script found in dist/tools/coccinelle. | ||
|
||
2.1 Check for code duplication | ||
2.2 Check memory usage |
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.
Include https://github.com/RIOT-OS/RIOT/wiki/Comparing-build-sizes once tested if it works
MAINTAINING.md
Outdated
2.6 Check scope of variables and functions | ||
2.7 Check for syntactical, semantical or logical errors | ||
2.8 Check for any runtime efficiency improvements that can be made in specific lines of code - i.e., without changing the overall design of the code | ||
|
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.
2.9 Check that the code design is as simple as possible, but no simpler
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 agree with @aabadie about the line-length (helps also with the review, as sentences are easier to sub-divide).
Nit-picky git usage style comment: usually an imperative commit summary style should be used, as if giving a command to the codebase, e.g. "doc: add maintainer guidelines"
MAINTAINING.md
Outdated
|
||
### 1. - Review the fundamentals | ||
|
||
1.1 Does the reasoning for this PR make sense? Are the requirements and design goals clearly thought out and clearly expressed? Is the problem that the PR intends to solve clearly stated? |
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.
Lot's of trailing whitespaces here and below
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.
There are two spaces at the end of each line of the numbered lists, so that they print as a list rather than just one long line
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 have removed these and changed the lists to integer numbering, i.e. 1, 2, 3 etc. This removes the need for trailing whitespace
MAINTAINING.md
Outdated
|
||
- Usage of labels | ||
- Division of review responsibilities, e.g. with ACKs for different areas of review | ||
- Usage of Github functionality re "Reviewers" and "Assignees" |
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.
Canonical spelling is GitHub.
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.
Done
MAINTAINING.md
Outdated
|
||
- Usage of labels | ||
- Division of review responsibilities, e.g. with ACKs for different areas of review | ||
- Usage of Github functionality re "Reviewers" and "Assignees" |
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.
"are"?
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.
re means "regarding/in the matter concerning" - https://en.oxforddictionaries.com/definition/re
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.
Have changed this for clarity
MAINTAINING.md
Outdated
|
||
Notes: | ||
- Any of the items in this list might be skipped, if clearly and logically articulated reasons are presented. | ||
- The order of the steps is meant to maximize efficiency and minimize overhead, with the philosophy that failing in step n makes steps n+x obsolete. However, this efficiency can depend on the quality of the submission itself. If the PR is clearly not in a reviewable state, for example due to poor code cleanliness or overall design, it might be more efficient to give the contributor some broader comments for improvement before further review. |
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.
Maybe use parenthesis or hyphen for the insertion "for example due to poor code cleanliness or overall design" to make this rather long sentence easier to parse.
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.
Done
MAINTAINING.md
Outdated
|
||
Notes: | ||
- Any of the items in this list might be skipped, if clearly and logically articulated reasons are presented. | ||
- The order of the steps is meant to maximize efficiency and minimize overhead, with the philosophy that failing in step n makes steps n+x obsolete. However, this efficiency can depend on the quality of the submission itself. If the PR is clearly not in a reviewable state, for example due to poor code cleanliness or overall design, it might be more efficient to give the contributor some broader comments for improvement before further review. |
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.
This is the first occurrence of the abbreviation "PR". Though maintainers most likely should know what a PR is, I think it's more easier to follow, if PR is resolved here at least: "PR (Pull Request)".
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.
done
MAINTAINING.md
Outdated
|
||
### 1. - Review the fundamentals | ||
|
||
1.1 Does the reasoning for this PR make sense? Are the requirements and design goals clearly thought out and clearly expressed? Is the problem that the PR intends to solve clearly stated? |
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.
These three questions look a little bit busy in the rendered form. Maybe split them up linewise?
1.1 Does the reasoning for this PR make sense? \
Are the requirements and design goals clearly thought out and clearly expressed? \
Is the problem that the PR intends to solve clearly stated?
(apply this for other multi-question points also if you agree)
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.
done
MAINTAINING.md
Outdated
|
||
The following list is not exhaustive and addresses the coding issues we have regularly seen in the past. In particular, check that the [Best Practices for RIOT Programming](https://github.com/RIOT-OS/RIOT/wiki/Best-Practice-for-RIOT-Programming) are followed. These checks can be aided (but not replaced) by a tool such as Coccinelle, using the script found in dist/tools/coccinelle. | ||
|
||
2.1 Check for code duplication |
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.
Section above used punctuation. For consistency I would also prefer it to be used here.
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.
(same goes for section 4 as well of course)
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.
Sorry, just to clarify: do you mean the numbered list format? The paragraphs in sections 2. and 4. indicate a general overview to the section rather than something that would fit in a list format. Perhaps for consistency I could add a short paragraph at the top of section 1.?
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've gone with this, also for section 5.
MAINTAINING.md
Outdated
|
||
### 3. - Test the PR | ||
|
||
Run tests to verify the correct behavior (see 1.6), both on Native and on a few selected boards, or present clearly and logically articulated reasons for skipping some/all tests. |
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.
`native`
instead of Native?
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.
done
MAINTAINING.md
Outdated
|
||
### 4. - Review the code against the coding conventions | ||
|
||
Check that the code follows the [Coding Conventions](https://github.com/RIOT-OS/RIOT/wiki/Coding-conventions). This can be aided (but not replaced) by Uncrustify, using the uncrustify-riot.cfg file found in the root directory. Note the difference between personal coding style, which is subjective and is allowed subject to the other guidelines, and the coding conventions, which are absolute and must always be followed. |
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.
Git-expert nitpick: s/root directory/base directory/
;-)
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.
done
287adae
to
0ed4ecc
Compare
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.
Minor improvement proposal left.
MAINTAINING.md
Outdated
|
||
The following list is not exhaustive and addresses the coding issues we have | ||
regularly seen in the past. In particular, check that the | ||
[Best Practices for RIOT Programming](https://github.com/RIOT-OS/RIOT/wiki/Best-Practice-for-RIOT-Programming) |
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.
The line length problem with URLs could be solved by using references. E.g.
In particular, check that the [Best Practices] for RIOT Programming are followed.
...
2. [Check memory usage][Comparing build sizes]
...
[Best Practices]: https://github.com/RIOT-OS/RIOT/wiki/Best-Practice-for-RIOT-Programming
[Comparing build sizes]: https://github.com/RIOT-OS/RIOT/wiki/Comparing-build-sizes
IMHO that would also make the text more readable in clear text.
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.
Done
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.
ACK, please squash
- This document is the result of original work by @haukepetersen and refinement by @miri64, @aabadie, @kaspar030, @jcarrano, @PeterKietzmann, @ZetaR60, and @jia200x.
9a67cec
to
849d209
Compare
Squashed/rebased. |
Tests passing. |
Contribution description
This PR adds a set of maintainer guidelines.
The aim is to provide a helpful set of steps and guidelines to assist maintainers, both to facilitate their job, and to encourage a high standard of review across the board.
It would be useful to gain input from as many other maintainers as possible as to what the specifics of "a high standard of review" are, so they can be captured here.
It is to be noted that these are not a set of "rules", that must be enforced. They are rather guidelines, and the implementation should end doing the two things in the second paragraph, not end up hindering people.