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

Allow more fine-grained per-rule settings in the Gradle DSL? #461

Open
RBusarow opened this issue Mar 18, 2022 · 0 comments
Open

Allow more fine-grained per-rule settings in the Gradle DSL? #461

RBusarow opened this issue Mar 18, 2022 · 0 comments

Comments

@RBusarow
Copy link
Member

Currently, the DSL allows for individual rule toggles, but auto-correct behavior is global. And the only rule which has a root-level "ignore" list is UnusedDependency with ignoreUnusedFinding.

Other findings have the same problem -- overshot, inheritedDependency, and mustBeApi especially. They should also have a global ignore list, but putting everything top-level in the DSL gets very noisy.

It might make sense to do something like this:

moduleCheck {
  unusedDependency {
    enabled = true
    ignored = listOf(...)
    autoCorrect = true
  }
  inheritedDependency {
    ...
  }
}

This can follow the standard conventions of extension DSLs, so that a more concise configuration is still possible:

moduleCheck {
  unusedDependency.enabled = true
  inheritedDependency.enabled = true
  ...
}

Another option would be to just go the route of a full .yaml config. But there aren't that many rules, and I don't know many people who actually like yaml.

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

No branches or pull requests

1 participant