Skip to content

Substitution support in custom rules #5728

@dankinsoid

Description

@dankinsoid

New Issue Checklist

Feature Request or Enhancement Proposal

I suggest supporting substitutions in custom rules to provide contextual warnings and errors.

Example of the rule with a substitution:

    corner_radius_setter:
      name: "CornerRadius setter"
      regex: 'layer\.cornerRadius = (.+)'
      message: "Use setCornerRadius($1) instead"
      severity: warning

So for this line:

layer.cornerRadius = 34

We get the message:
Use setCornerRadius(34) instead

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementIdeas for improvements of existing features and rules.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions