-
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
Changes from 1 commit
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,21 @@ 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 scope; avoid `public` unless necessary. | ||
|
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. I think Also, maybe we can change this from
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.
Scope visibility. I actually asked gemini to come up with a precise sentence for itself, but it maybe too precise for human reading now. Let me update it.
In my experience, a stronger word usually have better success rate. It sometimes ignores commands if it is not strong and clear. Let's start with it and see how it goes? We can change it if we see that it is too constraining for gemini to do its job.
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. Updated, PTAL.
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.
Yep! Let's try it and see how it goes. |
||
| 2. Use short names over fully qualified names. | ||
| 3. Avoid `@ObsoleteApi` or `@Deprecated` methods unless necessary. | ||
|
blakeli0 marked this conversation as resolved.
Outdated
|
||
| 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.
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. Ok! Let's try it and see if it helps! |
||
| 5. Use `mvn` for everything other than the `test/integration` folder. | ||
|
Comment on lines
+135
to
+141
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. not something we need to do in this PR, but I wonder if we can move some of these sections to a root GEMINI.md file. I think style guide and dependency management apply to all modules now that we have a monorepo
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. Agreed. I don't think there is a root gemini.md yet. We can do it in a separate PR. |
||
|
|
||
| ## 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.