Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new task: delete commented out dependencies #554

Open
RBusarow opened this issue Apr 22, 2022 · 0 comments
Open

new task: delete commented out dependencies #554

RBusarow opened this issue Apr 22, 2022 · 0 comments
Labels
feature New feature or request

Comments

@RBusarow
Copy link
Member

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.

@RBusarow RBusarow added the feature New feature or request label Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant