Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

[New rule] prefer-abstract-field #1075

Open
1 of 3 tasks
fzyzcjy opened this issue Nov 12, 2022 · 0 comments
Open
1 of 3 tasks

[New rule] prefer-abstract-field #1075

fzyzcjy opened this issue Nov 12, 2022 · 0 comments
Assignees
Labels
area-rules type: enhancement New feature or request

Comments

@fzyzcjy
Copy link
Contributor

fzyzcjy commented Nov 12, 2022

Please describe what the rule should do:

abstract class A {
  double get a;
  set a(double value);
}

can be written as following:

abstract class A {
  abstract double a;
}

The linter should warn for the first case (so users can write the second case)

If your rule is inspired by other please provide link to it:

What category of rule is this? (place an "X" next to just one item)

  • Warns about a potential error (problem)
  • Suggests an alternate way of doing something (suggestion)
  • Other (please specify:)

Provide 2-3 code examples that this rule will warn about (it will be better if you can provide both good and bad examples):

Are you willing to submit a pull request to implement this rule?

@incendial incendial changed the title [New rule] abstract_field [New rule] prefer-abstract-field Dec 5, 2022
@incendial incendial added type: enhancement New feature or request area-rules labels Dec 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-rules type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants