Skip to content

Feature suggestion: rules with different properties for specific files #2258

@michalbundyra

Description

@michalbundyra

I have a feature suggestion to add ability to define different rule properties for specific files, let say something like:

<rule ref="MyRule.Ref">
  <include-pattern>./src</include-pattern>
  <properties>
    <property name="indent" value="4">
  </properties>
</rule>

<rule ref="MyRule.Ref"> <!-- the same rule -->
  <include pattern>./other</include-pattern> <!-- different files -->
  <properties>
    <property name="indent" value="2"> <!-- here different value -->
  </properties>
</rule>

Not sure what should be the format, maybe we can do it another way... Or maybe it is already possible to do something like that, but I am not aware of it?

What do you think? If you like that idea maybe I would be able to work on it in some near future ;-)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions