When there are quotes around the version in dart language version comment, e.g.
// @dart="2.7"
// @dart='2.7'
There is a message
The Dart language version override comment must be specified with an '=' character
Specify a Dart language version override with a comment like '// @dart = 2.0'.
However, the message should be something else, since the issue not regarding a missing = character.
The issue no longer exists if there is a space after =, e.g.
// @dart= "2.7"
// @dart= '2.7'
however it is not considered as a language version comment (which is ok), but a Hint would also be better in this case.
We should either have another HintCode, or at least get INVALID_LANGUAGE_VERSION_OVERRIDE_NUMBER
This is an analyzer message.
It doesn't conform to the specified dart-version handling, so the scanner sees it as just any other comment.
The analyzer tries to me helpful --- I'll reassign.
When there are quotes around the version in dart language version comment, e.g.
There is a message
However, the message should be something else, since the issue not regarding a missing
=
character.The issue no longer exists if there is a space after
=
, e.g.however it is not considered as a language version comment (which is ok), but a Hint would also be better in this case.
We should either have another
HintCode
, or at least getINVALID_LANGUAGE_VERSION_OVERRIDE_NUMBER
https://github.com/dart-lang/sdk/blob/dea3861e5f956a589ea117e8e4a7f2e56b173af8/pkg/analyzer/lib/src/dart/error/hint_codes.dart#L1063-L1066
Appreciate deciding what should be done, I could try to implement.