Skip to content

Commit 109b62f

Browse files
chore: Add style guide to gemini.md (#12676)
This PR adds common coding style guide to gemini.md. --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 97a7744 commit 109b62f

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

sdk-platform-java/GEMINI.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,22 @@ Showcase integration tests are run against a local server that implements the Sh
131131
cd java-showcase
132132
mvn verify -P enable-integration-tests
133133
```
134-
135-
## 5. Dependency Management
134+
135+
## 5. Style Guide
136+
137+
1. Minimize visibility scopes by defaulting to the most restrictive access level, avoiding the `public` modifier unless required.
138+
2. Use short names over fully qualified names.
139+
3. Avoid calling `@ObsoleteApi` or `@Deprecated` methods unless there are no alternatives.
140+
4. Avoid unnecessary formatting changes to keep diffs clean.
141+
5. Use `mvn` for everything other than the `test/integration` folder.
142+
143+
## 6. Dependency Management
136144

137145
- Try not to bump any external dependency version unless there is a known CVE (security or vulnerability issue) or a critical bug fix.
138146
- Try to avoid introducing new external dependencies. If a new dependency is required, please state the reason.
139147
- Prefer to use features from the Java standard library, then try to use features from any existing dependencies (preferably from Google managed dependencies).
140148

141-
## 6. Contribution Guidelines
149+
## 7. Contribution Guidelines
142150

143151
- **Commits:** Commit messages should follow the [Conventional Commits](https://www.conventionalcommits.org/)
144152
specification. The format is `<type>: <description>`. The type should be one of the following: fix, feat,

0 commit comments

Comments
 (0)