-
Notifications
You must be signed in to change notification settings - Fork 1.1k
chore: Add style guide to gemini.md #12676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 | |
| cd java-showcase | ||
| mvn verify -P enable-integration-tests | ||
| ``` | ||
|
|
||
| ## 5. Dependency Management | ||
|
|
||
| ## 5. Style Guide | ||
|
|
||
| 1. Minimize visibility scopes by defaulting to the most restrictive access level, avoiding the `public` modifier unless required. | ||
| 2. Use short names over fully qualified names. | ||
| 3. Avoid calling `@ObsoleteApi` or `@Deprecated` methods unless there are no alternatives. | ||
| 4. Avoid unnecessary formatting changes to keep diffs clean. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does this line covering? Doesn't everything get run through the formatter?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They do, but we don't always run format after every change. My gemini sometimes format unrelated changes and makes code review harder, this would avoid unrelated formatting while developing locally. |
||
| 5. Use `mvn` for everything other than the `test/integration` folder. | ||
|
|
||
| ## 6. Dependency Management | ||
|
|
||
| - Try not to bump any external dependency version unless there is a known CVE (security or vulnerability issue) or a critical bug fix. | ||
| - Try to avoid introducing new external dependencies. If a new dependency is required, please state the reason. | ||
| - Prefer to use features from the Java standard library, then try to use features from any existing dependencies (preferably from Google managed dependencies). | ||
|
|
||
| ## 6. Contribution Guidelines | ||
| ## 7. Contribution Guidelines | ||
|
|
||
| - **Commits:** Commit messages should follow the [Conventional Commits](https://www.conventionalcommits.org/) | ||
| specification. The format is `<type>: <description>`. The type should be one of the following: fix, feat, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.