FED-756 Allow analyzer 2.x, fix analyzer plugin in newer SDKs#807
Merged
rmconsole3-wf merged 14 commits intomasterfrom Feb 16, 2023
Merged
FED-756 Allow analyzer 2.x, fix analyzer plugin in newer SDKs#807rmconsole3-wf merged 14 commits intomasterfrom
rmconsole3-wf merged 14 commits intomasterfrom
Conversation
Security InsightsNo security relevant content was detected by automated scans. Action Items
Questions or Comments? Reach out on Slack: #support-infosec. |
Errors look like:
Invalid @GenerateMocks annotation: Mockito cannot generate a valid mock class which implements 'List' for the following reasons:
The method 'Iterable.reduce' features a non-nullable unknown return type, and cannot be stubbed. Try generating this mock with a MockSpec with 'unsupportedMembers' or a dummy generator (see https://pub.dev/documentation/mockito/latest/annotations/MockSpec-class.html).
| channel.sendNotification(plugin.AnalysisErrorsParams(analysisResult.path!, []).toNotification()); | ||
| return []; | ||
| } | ||
|
|
Member
There was a problem hiding this comment.
I assume this was removed because analysisResult.unit is non-nullable?
Contributor
Author
There was a problem hiding this comment.
Yup, exactly.
robbecker-wf
previously approved these changes
Feb 14, 2023
hunterbreathat-wk
previously approved these changes
Feb 16, 2023
Contributor
hunterbreathat-wk
left a comment
There was a problem hiding this comment.
While I may not be overly familiar with analyzers, these changes make sense; many of them are null-safe changes. I've got a couple of easy questions and a nit.
hunterbreathat-wk
approved these changes
Feb 16, 2023
Member
|
QA+1 CI Passes with updated tests |
Contributor
Author
|
@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
We want to pull in newer analyzer versions, and unlocking analyzer 2.x is the next step.
Also, while testing I noticed that the analyzer plugin doesn't correctly start in IDEs in Dart 2.18☹️ . Since this PR touches analyzer_plugin, I figured I'd fix that so we can manually verify changes.
Changes
Supporting both isn't necessary since the plugin is its own separate dependency graph, and supporting one is almost definitely easier. I went ahead and picked 2.x as the one to resolve to, since we'd have to upgrade anyways whenever the main package drops support for 1.x.
ErrorCodeobjects instead of Strings, and we couldn't construct ErrorCodes without more src importsThese all import non-null-safe code from over_react's boilerplate parsing, which apparently prevents the plugin from being able to run in 2.18 SDK, and our previous workaround of a language comment in the plugin's
mainno longer works. Until we're able to migrate that code to null safety (which will hopefully be soonish), we'll need to stop importing these to get the plugin working again.Release Notes
Widen analyzer range to allow 2.x in addition to 1.x
Review
See CONTRIBUTING.md for more details on review types (+1 / QA +1 / +10) and code review process.
Please review:
QA Checklist
Merge Checklist
While we perform many automated checks before auto-merging, some manual checks are needed: