Azure / appcat-rulesets

Repository for maintaining Rulesets for Windup
Eclipse Public License 2.0
6 stars 9 forks source link

Override common rules to be more Azure specific #23

Closed agoncal closed 2 months ago

agoncal commented 1 year ago

There are some common rules that are worth using for our Azure targets:

But we might want the messages displayed to the user to be more Azure specific. For example, the rule that check the Windows path vs Linux path:

<rule id="os-specific-00001">
    <perform>
        <hint title="Windows file system path" effort="1" category-id="mandatory">
            <message>This file system path is Microsoft Windows platform dependent. It needs to be replaced with a Linux-style path.</message>
        </hint>
    </perform>
</rule>

If we want to be more specific on our message, we can use the rule overriding mecanism in WindUp.

These overriding rules will not be contributed back to WindUp. For that, we should keep them separate. Maybe a new rules-override-azure directory that mimics the other common rules structure:

├── rules
│   ├── rules-archived
│   ├── rules-generated
│   ├── rules-reviewed
│   │   ├── azure
│   │   ├── camel3
│   │   ├── core.windup.categories.xml
│   │   ├── droolsjbpm
│   │   ├── eap6
│   │   ├── eap7
│   │   ├── eap8
│   │   ├── eapxp
│   │   ├── filemappings
│   │   └── ...
└───── rules-override-azure
        ├── azure
        ├── camel3
        ├── core.windup.categories.xml
        ├── droolsjbpm
        ├── eap6
        ├── eap7
        ├── eap8
        ├── eapxp
        ├── filemappings
        └── ...

Common Rules that could be Overridden:

In technology-usage there are many rulesets that could partially be overriden:

agoncal commented 1 year ago

Looks like we cannot override an issue with different target (see https://issues.redhat.com/browse/WINDUP-3814 that @KaiqianYang created)

agoncal commented 1 year ago

@mrizzi also mentioned "The condition for overriding is that both ruleset and rule IDs must match."

agoncal commented 1 year ago

Trying something different: https://github.com/Azure/windup-rulesets/pull/47

agoncal commented 1 year ago

This has been fixed with https://github.com/windup/windup-rulesets/pull/987

brunoborges commented 1 year ago

I am moving this to Post-MVP, so that we focus on the rules we still need to close down. If we are done, we can go back and start discussing these, as the list is not small. Might as well break down into separate issues later.