Upgrade to analyzer ^14.0.0 - #98
Merged
Merged
Conversation
- Require analyzer ^14.0.0 and Dart SDK ^3.11.0 - Use diagnosticCode.lowerCaseName instead of deprecated errorCode.name - Replace removed LibraryIdentifier with DottedName in tests - Fix outdated analyzer imports and examples in README and docs Co-authored-by: Cursor <cursoragent@cursor.com>
- Await the codemod future inside try so async errors are caught and reported with ExitCode.software instead of escaping uncaught - Remove invalid @OverRide annotations on top-level functions - Format file_context.dart Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
robbecker-wf
commented
Sep 23, 2026
| uses: Workiva/gha-dart-oss/.github/workflows/checks.yaml@v0.1.14 | ||
| with: | ||
| sdk: 3.13.4 | ||
| format-check: false |
Member
Author
There was a problem hiding this comment.
will follow up with a format-all-the-code PR
robbecker-wf
commented
Sep 23, 2026
| return ExitCode.success.code; | ||
| } | ||
| return overrideAnsiOutput<Future<int>>( | ||
| return await overrideAnsiOutput<Future<int>>( |
Member
Author
There was a problem hiding this comment.
had to fix analyzer warnings since it was failing now under newer dart
robbecker-wf
commented
Sep 23, 2026
| yield FooPatch(); | ||
| } | ||
|
|
||
| @override |
Member
Author
There was a problem hiding this comment.
more analyzer warnings
robbecker-wf
marked this pull request as ready for review
September 23, 2026 18:26
alanknight-wk
approved these changes
Sep 23, 2026
Comment on lines
-24
to
+34
| Future<int> runInteractiveCodemod(Iterable<File> files, Suggestor suggestor); | ||
| Future<int> runInteractiveCodemod(Iterable<String> filePaths, Suggestor suggestor); |
Contributor
There was a problem hiding this comment.
Note to self - this is just aligning the docs with the code; no breaking change was made in this PR.
evanweible-wf
approved these changes
Sep 23, 2026
Member
Author
|
QA +1 CI passes @Workiva/release-management-p |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Consumers on newer toolchains need
codemodto work with analyzer 14. The current constraint (>=5.13.0 <11.0.0) blocks that.Changes
analyzer: ^14.0.0. Analyzer 14 requires Dart^3.11.0, so the SDK constraint is raised to match.FileContext.getUnresolvedUnit: usediagnosticCode.lowerCaseNameinstead of the deprecatederrorCode.namewhen building parse-error messages. Error codes now print in lower case (e.g.expected_token).LibraryIdentifierwas removed in analyzer 12, so theLibNameDoublertest visitor now usesvisitDottedName/DottedName.tokens.package:analyzer/analyzer.dartimport in examples, correct therunInteractiveCodemodsignature, and importpackage:codemod/test.dartin the testing examples.This is a breaking change for consumers on analyzer < 14 or Dart < 3.11.
Release Notes
Require analyzer ^14.0.0 and Dart SDK ^3.11.0.
Review
See CONTRIBUTING.md for more details on review types and code review process.
Please review:
QA Checklist
dart analyze(no new issues) anddart test(all 75 pass) on Dart 3.13.4 with analyzer 14.4.0Merge Checklist
While we perform many automated checks before auto-merging, some manual checks are needed: