This repository contains per-language readability requirements and also serves as the source of truth for current readability members.
Language-specific standards are available in the WiKi.
To propose new readability:
-
Find the associated language YAML file in the
terraform
directory. For example, to Go readability file is interraform/go.yaml
. -
Propose a new membership under the members section:
github_username: 'member'
for example:
sethvargo: 'member'
-
Create a Pull Request - GitHub will automatically assign the appropriate reviewers.
If the Pull Request reports errors, inspect the output and fix errors. Usually these errors are due to improper formatting or invalid YAML.
By default, readabilty is not enforced. To enforce readability:
-
Grant
@abcxyz/<lang>-readability
triage
or greater permissions on your repository. -
Add the following line(s) to your
CODEOWNERS
file:*.ext @abcxyz/<lang>-readability
for example, for Go readability:
*.go @abcxyz/go-readability
if your language has multiple file extensions, add them all:
*.java @abcxyz/java-readability *.scala @abcxyz/java-readability
-
Ensure you have branch protection rules to require a minimum number of reviewers. Specifically "Require review from Code Owners".
There are two types of languages used by abcxyz
. Languages with broad adoption that are a standard part of our technology stack (i.e. Go, Terraform, etc.) and languages with limited use or that are in early adoption (i.e. Python, Dart, etc.).
For new languages that we are uncertain about their widespread adoption, we will add targeted individuals as the CODEOWNERS for new repos. We will only convert them to a group and establish the standard readability practice after the usage of that language exceeds 5 repositories or 50k lines of code.
When a language exceeds the limited use phase a group will be created for it as is documented below.
-
Manually create two teams in the organization.
-
Main readability team: - This is the team that will have people that have been granted readability.
- Name:
<lang>-readability
(e.g.go-readability
), all lowercase. - Description:
<lang> readability
(e.g.Go readability
), normal case. - Parent team:
readability
.
- Name:
-
Readability approvers team: - This is the team that has permission to grant other people readability.
- Name:
<lang>-readability-approvers
(e.g.go-readability-approvers
), all lowercase. - Description:
<lang> readability approvers
(e.g.Go readability approvers
), normal case. - Parent team:
readability
.
- Name:
-
-
Go to the team's settings page for each team and click on "Code review" in the sidebar.
- Only notify requested team members: Checked.
- Enable auto assignment: Checked.
- How many team members should be assigned to review?: 1.
- Routing algorithm: Load balance.
- Team review assignment: Uncheck.
Leave all other options as the default.
-
(Optional) On the team's settings page, upload a logo.
-
Update
terraform/main.tf
and add a new readabilty option to thefor_each
. -
Create a new YAML file
terraform/<lang>.yaml
and add at least one maintainer. If you are the language owner, you can add yourself. -
Propose a Pull Request with the changes.