Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Substitution support in custom rules #5728

Open
dankinsoid opened this issue Aug 5, 2024 · 0 comments
Open

Substitution support in custom rules #5728

dankinsoid opened this issue Aug 5, 2024 · 0 comments
Labels
enhancement Ideas for improvements of existing features and rules.

Comments

@dankinsoid
Copy link

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

@SimplyDanny SimplyDanny added the enhancement Ideas for improvements of existing features and rules. label Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Ideas for improvements of existing features and rules.
Projects
None yet
Development

No branches or pull requests

2 participants