Skip to content

how to archRule.failOnEmptyShould(false) with this plugin? #39

Description

@sloppycoder

I tried to follow the example,

configurableRules=[
   configurableRule("com.tngtech.archunit.library.GeneralCodingRules", applyOn("com.my.project","main") )
]
    

but got error like the following:

     Rule 'no classes should use field injection, because field injection is considered harmful; use constructor injection or setter injection instead; see https://stackoverflow.com/q/39890849 for detailed explanations' failed to check any classes. This means either that no classes have been passed to the rule at all, or that no classes passed to the rule matched the `that()` clause. To allow rules being evaluated without checking any classes you can either use `ArchRule.allowEmptyShould(true)` on a single rule or set the configuration property `archRule.failOnEmptyShould = false` to change the behavior globally.

so I wonder how setting this property can be done? Is it a maven only thing and is not applicable to gradle plugin?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions