Skip to content

Latest commit

 

History

History
38 lines (33 loc) · 1.96 KB

best-practices-for-a-successful-pr.md

File metadata and controls

38 lines (33 loc) · 1.96 KB

Best Practices

(a.k.a "Rules of thumb")

Provide motivation for the change

Try to explain why this change will make the code better. For example, does it fix a bug, or is it a new feature, etc. This should be expressed in the commit messages as well as in the PR description.

Don't make unnecessary code changes

Unnecessary code changes are changes made because of personal preference or style. For example, renaming of variables or functions, adding or removing white spaces, and reordering lines or whole code blocks. These sort of changes should have a good reason since otherwise they cause unnecessary code churn As part of the project's strategy we maintain multiple release lines, code churn might hinder back-porting changes to other lines. Also when you change a line, your name will come up in git blame and shadow the name of the previous author of that line.

Keep the change-set self contained but at a reasonable size

Use good judgment when making a big change. If a reason does not come to mind but a very big change needs to be made, try to break it into smaller pieces (still as self-contained as possible), and cross-reference them, explicitly stating that they are dependent on each other.

Be aware of our style rules

As part of accepting a PR the changes must pass our linters.