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

[macros] support for unnecessary_getters_setters #4935

Open
Tracked by #4881
pq opened this issue Apr 11, 2024 · 0 comments
Open
Tracked by #4881

[macros] support for unnecessary_getters_setters #4935

pq opened this issue Apr 11, 2024 · 0 comments
Assignees
Labels
new-language-feature P2 A bug or feature request we're likely to work on set-recommended Affects a rule in the recommended Dart rule set type-enhancement A request for a change that isn't a bug

Comments

@pq
Copy link
Member

pq commented Apr 11, 2024

Like support for use_enums, etc. this will require us to have more than only member-level access to augmentation contributed accessors (see e.g., isSimpleSetter).

Also, an open question:

Currently we report this lint on the accessor declaration. In a case where both accessors (and the wrapped field even) are declared in an augmentation, should we instead report on the class declaration?

For example:

class A { } // HERE?
augment class A {
  String? _x;

  String? get x => _x;
  set x(String? value) {
    _x = value;
  }
}
@pq pq added P2 A bug or feature request we're likely to work on new-language-feature labels Apr 11, 2024
@github-actions github-actions bot added the set-recommended Affects a rule in the recommended Dart rule set label Apr 11, 2024
@srawlins srawlins added the type-enhancement A request for a change that isn't a bug label Apr 12, 2024
@pq pq self-assigned this May 13, 2024
copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue May 13, 2024
See: dart-lang/linter#4935


Change-Id: I8da7a111d86ea71338382a7c39558481c920cc37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366220
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-language-feature P2 A bug or feature request we're likely to work on set-recommended Affects a rule in the recommended Dart rule set type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants