Skip to content

Commit e503513

Browse files
committed
Add review agent style guidelines and configs
+ flutter-tizen/flutter-tizen#735
1 parent 84b0627 commit e503513

File tree

2 files changed

+89
-0
lines changed

2 files changed

+89
-0
lines changed

.gemini/config.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Minimize verbosity.
2+
have_fun: false
3+
code_review:
4+
# For now, use the default of MEDIUM for testing. Based on desired verbosity,
5+
# we can change this to LOW or HIGH in the future.
6+
comment_severity_threshold: MEDIUM
7+
pull_request_opened:
8+
# Explicitly set help to false in case the default changes in the future, as
9+
# having a help message on every PR would be spammy.
10+
help: false
11+
# These tend to be verbose, and since we expect PR authors to clearly
12+
# describe their PRs this would be at best duplicative.
13+
summary: false
14+
include_drafts: false
15+
ignore_patterns:
16+
- tools/test_data/**
17+
- packages/**/*.so

.gemini/styleguide.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Flutter-tizen Plugins Style Guide
2+
3+
## Introduction
4+
5+
This style guide outlines the coding conventions for contributions to the
6+
flutter-tizen/plugins repository.
7+
8+
## Style Guides
9+
10+
Code should follow the relevant style guides, and use the correct
11+
auto-formatter, for each language, as described in
12+
[the repository contributing guide's Style section](https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style).
13+
14+
## Best Practices
15+
16+
- Code should follow the guidance and principles described in
17+
[the flutter/packages contribution guide](https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md).
18+
- For Flutter code, the
19+
[Flutter styleguide](https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md)
20+
should be followed as the first priority, and
21+
[Effective Dart: Style](https://dart.dev/effective-dart/style)
22+
should only be followed when it does not conflict with the former.
23+
- Code should be tested. Changes to plugin packages, which include code written
24+
in C, C++, Java, Kotlin, Objective-C, or Swift, should have appropriate tests
25+
as described in [the plugin test guidance](https://github.com/flutter/flutter/blob/master/docs/ecosystem/testing/Plugin-Tests.md).
26+
27+
## Miscellaneous Languages
28+
29+
- C++ code is formatted using `clang-format`, linted with `clang-tidy`, and should follow the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html).
30+
31+
## Review Agent Guidelines
32+
33+
- Only review changes to the `master` branch. Other changes have already been reviewed (and are being cherrypicked).
34+
35+
When providing a summary, the review agent must adhere to the following principles:
36+
- Only review changes to the `master` branch. Other changes have already been reviewed (and are being cherrypicked).
37+
- **Be Objective:** Focus on a neutral, descriptive summary of the changes. Avoid subjective value judgments
38+
like "good," "bad," "positive," or "negative." The goal is to report what the code does, not to evaluate it.
39+
- **Use Code as the Source of Truth:** Base all summaries on the code diff. Do not trust or rephrase the PR
40+
description, which may be outdated or inaccurate. A summary must reflect the actual changes in the code.
41+
- **Be Concise:** Generate summaries that are brief and to the point. Focus on the most significant changes,
42+
and avoid unnecessary details or verbose explanations. This ensures the feedback is easy to scan and understand.
43+
44+
### Temporary dependency_overrides
45+
46+
It is normal practice for PRs that affect multiple packages in a federated plugin to contain a temporary
47+
`dependency_overrides` section during initial review. The review agent should not comment about
48+
`dependency_overrides` sections in `pubspec.yaml` files that have a comment starting with:
49+
"FOR TESTING AND INITIAL REVIEW ONLY. DO NOT MERGE."
50+
51+
## Documentation
52+
53+
- All public members should have documentation.
54+
- **Answer your own questions**: If you have a question, find the answer, and then document it where you first looked.
55+
- **Documentation should be useful**: Explain the *why* and the *how*.
56+
- **Introduce terms**: Assume the reader does not know everything. Link to definitions.
57+
- **Provide sample code**: Use `{@tool dartpad}` for runnable examples.
58+
- Inline code samples are contained within `{@tool dartpad}` and `{@end-tool}`, and use the format of the following example to insert the
59+
- **Provide illustrations or screenshots** for widgets.
60+
- Use `///` for public-quality documentation, even on private members.
61+
62+
## Further Reading
63+
64+
For more detailed guidance, refer to the following documents:
65+
66+
- [Style guide for the Flutter repository](https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md)
67+
- [Effective Dart: Style](https://dart.dev/effective-dart/style)
68+
- [Tree Hygiene](https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md)
69+
- [The Flutter contribution guide](https://github.com/flutter/flutter/blob/main/CONTRIBUTING.md)
70+
- [Writing effective tests guide](https://github.com/flutter/flutter/blob/main/docs/contributing/testing/Writing-Effective-Tests.md)
71+
- [Running and writing tests guide](https://github.com/flutter/flutter/blob/main/docs/contributing/testing/Running-and-writing-tests.md)
72+
- [Engine testing guide](https://github.com/flutter/flutter/blob/main/docs/engine/testing/Testing-the-engine.md)

0 commit comments

Comments
 (0)