|
| 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