You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>
Copy file name to clipboardExpand all lines: sdk-platform-java/GEMINI.md
+11-3Lines changed: 11 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,14 +131,22 @@ Showcase integration tests are run against a local server that implements the Sh
131
131
cd java-showcase
132
132
mvn verify -P enable-integration-tests
133
133
```
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
136
144
137
145
- Try not to bump any external dependency version unless there is a known CVE (security or vulnerability issue) or a critical bug fix.
138
146
- Try to avoid introducing new external dependencies. If a new dependency is required, please state the reason.
139
147
- Prefer to use features from the Java standard library, then try to use features from any existing dependencies (preferably from Google managed dependencies).
140
148
141
-
## 6. Contribution Guidelines
149
+
## 7. Contribution Guidelines
142
150
143
151
- **Commits:** Commit messages should follow the [Conventional Commits](https://www.conventionalcommits.org/)
144
152
specification. The format is `<type>: <description>`. The type should be one of the following: fix, feat,
0 commit comments