Exclude Compose previews from Jacoco reports#3584
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request aims to refine code coverage metrics by excluding UI preview functions from Jacoco reports. By annotating these functions, the project ensures that only production-relevant code contributes to the coverage percentage, leading to a more accurate representation of test coverage for the application's core logic. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request consistently adds the @ExcludeFromJacocoGeneratedReport annotation to various Jetpack Compose preview functions to exclude them from Jacoco code coverage reports. While this change is functional, I've suggested a more scalable approach in a comment to handle this project-wide, which would avoid the need for manual annotations in the future.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3584 +/- ##
============================================
+ Coverage 71.01% 71.09% +0.07%
Complexity 1625 1625
============================================
Files 337 337
Lines 9106 9096 -10
Branches 1006 1001 -5
============================================
Hits 6467 6467
+ Misses 2040 2030 -10
Partials 599 599
🚀 New features to boost your workflow:
|
* Add a conditional to e2e test The CompleteAllTaskTypesTest didn't cover conditional logic. Added a conditional question to the test survey and added tests for it in order to prevent regressions Closes #3481 * Reformat code * Refactor to remove conditional test logic * Refactor to seperate responsibility, move conditional test logic to DataCollectionRobot and add a reusable method to AndroidTestDriver * Bump com.google.firebase:firebase-bom from 34.9.0 to 34.10.0 (#3582) Bumps com.google.firebase:firebase-bom from 34.9.0 to 34.10.0. --- updated-dependencies: - dependency-name: com.google.firebase:firebase-bom dependency-version: 34.10.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Refactor settings screen to compose (#3574) * Migrate SettingsActivity to compose * Migrate SettingsFragment.kt to compose * Update unit tests * Remove unused strings * Decouple data layer from SettingsViewModel * Exclude Compose previews from Jacoco reports (#3584) * Refactor show sign out confirmation dialogs (#3583) * Bump org.mockito:mockito-bom from 5.21.0 to 5.22.0 (#3586) Bumps [org.mockito:mockito-bom](https://github.com/mockito/mockito) from 5.21.0 to 5.22.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](mockito/mockito@v5.21.0...v5.22.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-bom dependency-version: 5.22.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Rename variable to have a more conventional name * Create MultipleChoiceType sealed class to represent the kind of multiple choice questions being handled, Refactor DataCollectionRobot to use the new sealed class * Refactor to rename test constants to more descriptive names to give context about the tests * Reformat code to pass a code format check * Refactor to make constant names descriptive --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Nsubuga <nsubugahassan@gmail.com> Co-authored-by: Andreia Ferreira <51242456+andreia-ferreira@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Shobhit Agarwal <ashobhit@google.com>
Adds
ExcludeFromJacocoGeneratedReportannotation to all remaining compose previews.@andreia-ferreira PTAL?