Skip to content

new task: delete commented out dependencies #554

Open
@RBusarow

Description

@RBusarow

If ModuleCheck is configured to remove dependencies via a comment instead of just deleting, then build file dependencies blocks are left looking like this:

dependencies {
  testFixturesApi(testFixtures(project(path = ":lib1")))
  // api(testFixtures(project(path = ":lib1")))  // ModuleCheck finding [unusedDependency]
  api(project(path = ":lib2"))
  // implementation(project(path = ":lib2"))  // ModuleCheck finding [mustBeApi]
}

When first introducing ModuleCheck to a codebase, it can be a good idea to start out with comments instead of deletion. This way, there are breadcrumbs everywhere to help in debugging any build issues.

In a big project, this can be a pain to clean up -- especially for people not comfortable with regex.

It may be a good idea to add a task -- moduleCheckCleanUpComments -- which goes through all the build files and removes all the comments which were created by the plugin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions