Skip to content

Commit fb21c42

Browse files
vorburgercopybara-github
authored andcommitted
docs: Clarify Code Format and Single Commit on ADK Java CONTRIBUTING
PiperOrigin-RevId: 795450162
1 parent 0099e5f commit fb21c42

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

CONTRIBUTING.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,35 @@ information on using pull requests.
3434

3535
## PR policy
3636

37+
### Format
38+
39+
Code must be formatted according to the
40+
[Google Java Style Guide](https://google.github.io/styleguide/javaguide.html).
41+
42+
The Maven build will automagically run
43+
[`google-java-format`](https://github.com/google/google-java-format) when you
44+
locally build this project.
45+
46+
Pull requests will fail to build if you forget to commit reformatted code, and
47+
cannot be merged until you fix this.
48+
49+
### Single Commit
50+
51+
Pull Requests must contain only a **single commit.**
52+
53+
This is due to how Google replicates this Git repository both into and from its
54+
internal _monorepo_ (see [Wikipedia](https://en.wikipedia.org/wiki/Monorepo) and
55+
[Paper](https://research.google/pubs/why-google-stores-billions-of-lines-of-code-in-a-single-repository/))
56+
with [🦛 Copybara](https://github.com/google/copybara).
57+
58+
When adjusting a PR to code review feedback, please use `git commit --amend`.
59+
60+
You can use `git rebase -i main` to _meld/squash_ existing commits into one.
61+
62+
Then use `git push --force-with-lease` to update the branch of your PR.
63+
64+
We cannot merge your PR until you fix this.
65+
3766
### AI Generated code
3867

3968
It's ok to generate the first draft using AI but we would like code which has

0 commit comments

Comments
 (0)