Skip to content

Make checkCode run on all project modules#3599

Open
andreia-ferreira wants to merge 4 commits intomasterfrom
andreia/add-checkstyle-tasks-to-all-modules
Open

Make checkCode run on all project modules#3599
andreia-ferreira wants to merge 4 commits intomasterfrom
andreia/add-checkstyle-tasks-to-all-modules

Conversation

@andreia-ferreira
Copy link
Collaborator

Currently checkCode was only running on the app module. As new modules are created, this should also run on those. This PR makes the task run on all subprojects

Some existing detekt errors needed to be fixed in this process

@shobhitagarwal1612 PTAL?

@auto-assign auto-assign bot requested a review from shobhitagarwal1612 March 9, 2026 16:02
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, 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 significantly enhances the project's code quality enforcement by configuring the checkCode Gradle task to run across all subprojects. Previously limited to the app module, this change ensures that new and existing modules consistently adhere to defined coding standards. As a result, several pre-existing Detekt warnings were fixed, and some code was refactored for better maintainability.

Highlights

  • Expanded Code Quality Checks: The checkCode Gradle task has been updated to run across all project submodules, ensuring consistent code quality enforcement beyond just the app module.
  • Detekt Error Resolution: Several pre-existing Detekt code style and quality issues were identified and fixed as a result of broadening the checkCode task's scope.
  • Code Refactoring: Specific code in the e2eTest module was refactored to improve readability and align with coding standards.

🧠 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
  • build.gradle
    • Configured Detekt to analyze source files from all subprojects.
    • Updated Detekt configuration to use setFrom for source and config files.
    • Refactored the checkCode task to depend on detekt and dynamically include checkstyle, ktfmtCheck, lintLocalDebug, and lintAndroidMain tasks from all subprojects.
  • core/domain/src/commonMain/kotlin/org/groundplatform/domain/model/LoiReport.kt
    • Corrected KDoc comment by adding a period at the end.
  • e2eTest/src/main/java/org/groundplatform/android/e2etest/drivers/AndroidTestDriver.kt
    • Enclosed when expression branches in curly braces for consistency.
  • e2eTest/src/main/java/org/groundplatform/android/e2etest/robots/DataCollectionRobot.kt
    • Extracted task execution logic into executeTask and clickToNextStep private methods.
    • Replaced throw IllegalStateException with error(IllegalStateException(...)) for conciseness.
    • Updated listOf syntax for pairs.
    • Added curly braces to a when expression branch.
  • e2eTest/src/main/java/org/groundplatform/android/e2etest/tests/CompleteAllTaskTypesTest.kt
    • Added a standard Apache 2.0 copyright header.
Activity
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request successfully updates the build configuration to run checkCode on all project modules, which is a great improvement for code quality enforcement across the entire project. The changes in build.gradle are well-implemented, using modern Gradle practices. The associated fixes for detekt violations are also good. I have one minor suggestion to improve the way an exception is thrown in one of the test files.

@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.69%. Comparing base (4ab61e1) to head (26d2d9d).

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #3599   +/-   ##
=========================================
  Coverage     69.69%   69.69%           
  Complexity     1811     1811           
=========================================
  Files           349      349           
  Lines          9675     9675           
  Branches       1060     1060           
=========================================
  Hits           6743     6743           
  Misses         2298     2298           
  Partials        634      634           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants