You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
finalRegExp_deprecationVersionPattern=RegExp(r"^ *'This feature was deprecated after v(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)(?<build>-\d+\.\d+\.pre)?\.',?$");
throw'Deprecation notice should be a grammatically correct sentence and start with a capital letter; see style guide: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo';
throw'Deprecation notice does not accurately indicate a dev branch version number; please see https://flutter.dev/docs/development/tools/sdk/releases to find the latest dev build version number.';
// There was a beta release that was mistakenly labeled 3.1.0 without a build.
503
+
finalbool specialBeta = major ==3&& minor ==1&& patch ==0;
504
+
if (!specialBeta && (major >1|| (major ==1&& minor >=20))) {
505
+
if (!hasBuild)
506
+
throw'Deprecation notice does not accurately indicate a beta branch version number; please see https://flutter.dev/docs/development/tools/sdk/releases to find the latest beta build version number.';
504
507
}
505
-
if (!message!.endsWith('.') &&!message.endsWith('!') &&!message.endsWith('?'))
508
+
if (!message.endsWith('.') &&!message.endsWith('!') &&!message.endsWith('?'))
506
509
throw'Deprecation notice should be a grammatically correct sentence and end with a period.';
507
510
if (!lines[lineNumber].startsWith("$indent '"))
508
511
throw'Unexpected deprecation notice indent.';
509
512
lineNumber +=1;
510
513
if (lineNumber >= lines.length)
511
514
throw'Incomplete deprecation notice.';
512
-
if (!lines[lineNumber].contains(_deprecationPattern4))
515
+
if (!lines[lineNumber].contains(_deprecationEndPattern))
513
516
throw'End of deprecation notice does not match required pattern.';
514
517
if (!lines[lineNumber].startsWith('$indent)'))
515
518
throw'Unexpected deprecation notice indent.';
@@ -637,7 +640,7 @@ class _TestSkipLinesVisitor<T> extends RecursiveAstVisitor<T> {
'test/analyze-test-input/root/packages/foo/deprecation.dart:70: Deprecation notice does not accurately indicate a dev branch version number; please see RELEASES_URL to find the latest dev build version number.',
57
-
'test/analyze-test-input/root/packages/foo/deprecation.dart:76: Deprecation notice does not accurately indicate a dev branch version number; please see RELEASES_URL to find the latest dev build version number.',
58
-
'test/analyze-test-input/root/packages/foo/deprecation.dart:82: Deprecation notice does not accurately indicate a dev branch version number; please see RELEASES_URL to find the latest dev build version number.',
56
+
'test/analyze-test-input/root/packages/foo/deprecation.dart:70: Deprecation notice does not accurately indicate a beta branch version number; please see RELEASES_URL to find the latest beta build version number.',
57
+
'test/analyze-test-input/root/packages/foo/deprecation.dart:76: Deprecation notice does not accurately indicate a beta branch version number; please see RELEASES_URL to find the latest beta build version number.',
59
58
'test/analyze-test-input/root/packages/foo/deprecation.dart:99: Deprecation notice does not match required pattern. You might have used double quotes (") for the string instead of single quotes (\').',
0 commit comments