Skip to content

add option to run specific rules or ruleClass from CLI#73

Merged
emilyyuan03 merged 5 commits intomainfrom
run-single-rule
Apr 10, 2026
Merged

add option to run specific rules or ruleClass from CLI#73
emilyyuan03 merged 5 commits intomainfrom
run-single-rule

Conversation

@emilyyuan03
Copy link
Copy Markdown
Contributor

@emilyyuan03 emilyyuan03 commented Apr 1, 2026

Allows us to run only certain rules through a CLI gradle property. Build file configurations (ie. excluding rules) still take priority. Can include multiple rules thru comma-separated list.

Can be done using rule name: ./gradlew archRulesConsoleReport -PruleName=no Optional class fields,deprecated or rule class: -PruleClass=com.netflix.nebula.archrules.nullability

@emilyyuan03 emilyyuan03 changed the title add option to run single rule or ruleClass from CLI add option to run specific rules or ruleClass from CLI Apr 1, 2026
@emilyyuan03 emilyyuan03 requested a review from wakingrufus April 6, 2026 19:51
@wakingrufus
Copy link
Copy Markdown
Member

It's looking pretty good. I think instead of a regular Gradle property, this might be nicer: https://docs.gradle.org/8.1.1/userguide/custom_tasks.html#sec:declaring_and_using_command_line_options

Copy link
Copy Markdown
Member

@wakingrufus wakingrufus left a comment

Choose a reason for hiding this comment

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

Lgtm!

@emilyyuan03 emilyyuan03 merged commit 45716aa into main Apr 10, 2026
3 checks passed
@emilyyuan03 emilyyuan03 deleted the run-single-rule branch April 10, 2026 00:16
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.

3 participants