diff --git a/.gemini/config.yaml b/.gemini/config.yaml new file mode 100644 index 00000000000..77a0b18306e --- /dev/null +++ b/.gemini/config.yaml @@ -0,0 +1,13 @@ +# Minimize verbosity. +have_fun: false +code_review: + # For now, use the default of MEDIUM for testing. Based on desired verbosity, + # we can change this to LOW or HIGH in the future. + comment_severity_threshold: MEDIUM + pull_request_opened: + # Explicitly set help to false in case the default changes in the future, as + # having a help message on every PR would be spammy. + help: false + # These tend to be verbose, and since we expect PR authors to clearly + # describe their PRs this would be at best duplicative. + summary: false diff --git a/.gemini/styleguide.md b/.gemini/styleguide.md new file mode 100644 index 00000000000..38598b09ff2 --- /dev/null +++ b/.gemini/styleguide.md @@ -0,0 +1,23 @@ +# Flutter Packages Style Guide + +## Introduction + +This style guide outlines the coding conventions for contributions to the +flutter/packages repository. + +## Style Guides + +Code should follow the relevant style guides, and use the correct +auto-formatter, for each language, as described in +[the repository contributing guide's Style section](https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style). + +## Best Practices + +- Code should follow the guidance and principles described in + [the flutter/packages contribution guide](https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md). +- Code should be tested. Changes to plugin packages, which include code written + in C, C++, Java, Kotlin, Objective-C, or Swift, should have appropriate tests + as described in [the plugin test guidance](https://github.com/flutter/flutter/blob/master/docs/ecosystem/testing/Plugin-Tests.md). +- PR descriptions should include the Pre-Review Checklist from + [the PR template](https://github.com/flutter/packages/blob/main/.github/PULL_REQUEST_TEMPLATE.md), + with all of the steps completed. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 8c58cc3d251..b72a79308ed 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -18,6 +18,14 @@ If you need help, consider asking for advice on the #hackers-new channel on [Discord]. +**Note**: The Flutter team is currently trialing the use of +[Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). +Comments from the `gemini-code-assist` bot should not be taken as authoritative +feedback from the Flutter team. If you find its comments useful you can +update your code accordingly, but if you are unsure or disagree with the +feedback, please feel free to wait for a Flutter team member's review for +guidance on which automated comments should be addressed. + [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. diff --git a/script/tool/lib/src/common/file_filters.dart b/script/tool/lib/src/common/file_filters.dart index b1eb0899f29..0b64fb65989 100644 --- a/script/tool/lib/src/common/file_filters.dart +++ b/script/tool/lib/src/common/file_filters.dart @@ -8,21 +8,24 @@ /// commands that are only affected by package code. bool isRepoLevelNonCodeImpactingFile(String path) { return [ - 'AUTHORS', - 'CODEOWNERS', - 'CONTRIBUTING.md', - 'LICENSE', - 'README.md', - // This deliberate lists specific files rather than excluding the whole - // .github directory since it's better to have false negatives than to - // accidentally skip tests if something is later added to the directory - // that could affect packages. - '.github/PULL_REQUEST_TEMPLATE.md', - '.github/dependabot.yml', - '.github/labeler.yml', - '.github/post_merge_labeler.yml', - '.github/workflows/pull_request_label.yml', - ].contains(path); + 'AUTHORS', + 'CODEOWNERS', + 'CONTRIBUTING.md', + 'LICENSE', + 'README.md', + // This deliberate lists specific files rather than excluding the whole + // .github directory since it's better to have false negatives than to + // accidentally skip tests if something is later added to the directory + // that could affect packages. + '.github/PULL_REQUEST_TEMPLATE.md', + '.github/dependabot.yml', + '.github/labeler.yml', + '.github/post_merge_labeler.yml', + '.github/workflows/pull_request_label.yml', + ].contains(path) || + // This directory only affects automated code reviews, so cannot affect + // any package tests. + path.startsWith('.gemini/'); } /// Returns true for native (non-Dart) code files, for use in command-ignored- diff --git a/script/tool/test/xcode_analyze_command_test.dart b/script/tool/test/xcode_analyze_command_test.dart index 6342fab97c5..0ec408c6ba1 100644 --- a/script/tool/test/xcode_analyze_command_test.dart +++ b/script/tool/test/xcode_analyze_command_test.dart @@ -599,6 +599,7 @@ packages/package_a/$file gitProcessRunner.mockProcessesForExecutable['git-diff'] = [ FakeProcessInfo(MockProcess(stdout: ''' +.gemini/config.yaml README.md CODEOWNERS packages/package_a/CHANGELOG.md