proposals/p0042.md
Carbon should ensure that all checked-in changes to the repository are properly code reviewed, and that the process for code review is effective across a number of dimensions:
General code review:
Specific GitHub tooling:
Add a code review guide to the project, and reference it from our contributing guide and pull request workflow documentation.
Also create initial CODEOWNERS files in both this repository and the toolchain
repository based on current review activity and team roles. These are really
only suggested as an initial guess and should likely be iterated frequently as
more people join and begin contributing. The carbon-lang repository file is
included directly, and carbon-language/carbon-toolchain#1 updates the
carbon-toolchain repository.
Some projects, such as LLVM, use post-commit review for some changes. This has both advantages and disadvantages.
Advantages:
Disadvantages:
Another practice popular in the LLVM community is to skip pre-commit review for changes for which "no functionality changes" or NFC commits. Common examples are reformatting or basic code cleanup. The idea is that these are exceedingly lower risk compared changes to functionality.
Advantages:
Disadvantages:
This proposal contains the right goals for the code review process in light of our project goals, and the proposal is well-tailored to achieve them. Specifically:
We want pre-commit rather than post-commit review, and we want all changes to go through review. These guidelines are consistent with standard code review best practice, including what’s described in the cited sources.