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

non_constant_identifier_names should not be reported for externals? #4774

Open
DanTup opened this issue Oct 9, 2023 · 3 comments
Open

non_constant_identifier_names should not be reported for externals? #4774

DanTup opened this issue Oct 9, 2023 · 3 comments
Labels
false-positive P3 A lower priority bug or feature request set-core Affects a rule in the core Dart rule set set-recommended Affects a rule in the recommended Dart rule set type-enhancement A request for a change that isn't a bug

Comments

@DanTup
Copy link
Contributor

DanTup commented Oct 9, 2023

The following code triggers non_constant_identifier_names:

class Foo {
  /// The uuid of the user.
  external String get UID;
}

Given the implementation is external, it's probably not safe to rename this field in the Dart code so maybe the lint should exclude externals?

(this was used in Dart-Code/Dart-Code#4775 as an example, although the issue itself was about placement of the ignore rather than whether the lint should be triggered)

@github-actions github-actions bot added set-core Affects a rule in the core Dart rule set set-recommended Affects a rule in the recommended Dart rule set labels Oct 9, 2023
@bwilkerson
Copy link
Member

This probably applies to any name related lints, not just non_constant_identifier_names.

@pq
Copy link
Member

pq commented Oct 9, 2023

Related conversation in #3000.

@DanTup
Copy link
Contributor Author

DanTup commented Oct 9, 2023

Oh, is this an exact dupe of that one? I don't know how I missed that when I searched 🙃 (I do occasionally search for existing issues, and I did this time 😄)

@srawlins srawlins added the P3 A lower priority bug or feature request label Oct 17, 2023
@srawlins srawlins added the type-enhancement A request for a change that isn't a bug label Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
false-positive P3 A lower priority bug or feature request set-core Affects a rule in the core Dart rule set 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

4 participants