linter icon indicating copy to clipboard operation
linter copied to clipboard

non_constant_identifier_names should not be reported for `external`s?

Open DanTup opened this issue 2 years ago • 3 comments

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 https://github.com/Dart-Code/Dart-Code/issues/4775 as an example, although the issue itself was about placement of the ignore rather than whether the lint should be triggered)

DanTup avatar Oct 09 '23 18:10 DanTup