Skip to content
This repository was archived by the owner on Jul 16, 2023. It is now read-only.

chore: restrict analyzer version to >=2.4.0 <2.9.0 #578

Merged
merged 1 commit into from
Nov 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

* feat: add alphabetical sorting by type for `member-ordering-extended` rule.
* feat: add support mixins, extensions and enums for `prefer-match-file-name` rule.
* fix: prefer conditional expressions rule breaks code with increment / decrement operators
* chore: tune GitHub workflows
* fix: prefer conditional expressions rule breaks code with increment / decrement operators.
* chore: restrict `analyzer` version to `>=2.4.0 <2.9.0`.
* chore: tune GitHub workflows.

## 4.7.0

Expand Down
1 change: 1 addition & 0 deletions lib/src/analyzer_plugin/analyzer_plugin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ class AnalyzerPlugin extends ServerPlugin {
) async {
try {
final driver = driverForPath(parameters.file) as AnalysisDriver;
// ignore: deprecated_member_use
final analysisResult = await driver.getResult2(parameters.file);

if (analysisResult is! ResolvedUnitResult) {
Expand Down
1 change: 1 addition & 0 deletions lib/src/analyzer_plugin/analyzer_plugin_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ plugin.AnalysisErrorFixes codeIssueToAnalysisErrorFixes(
plugin.SourceChange(issue.suggestion!.comment, edits: [
plugin.SourceFileEdit(
fileWithIssue,
// ignore: deprecated_member_use
unitResult.libraryElement.source.modificationStamp,
edits: [
plugin.SourceEdit(
Expand Down
2 changes: 1 addition & 1 deletion lib/src/analyzers/lint_analyzer/lint_analyzer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,6 @@ class LintAnalyzer {
return functionRecords;
}

bool _isSupported(AnalysisResult result) =>
bool _isSupported(FileResult result) =>
result.path.endsWith('.dart') && !result.path.endsWith('.g.dart');
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ environment:
sdk: ">=2.14.0 <3.0.0"

dependencies:
analyzer: ">=2.4.0 <2.8.0"
analyzer: ">=2.4.0 <2.9.0"
analyzer_plugin: ^0.8.0
ansicolor: ^2.0.1
args: ^2.0.0
Expand Down
1 change: 1 addition & 0 deletions test/src/analyzer_plugin/analyzer_plugin_utils_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ void main() {
when(() => libraryElement.source).thenReturn(source);
when(() => resolvedUnitResult.libraryElement)
.thenReturn(libraryElement);
// ignore: deprecated_member_use
when(() => source.modificationStamp).thenReturn(modificationStamp);

final fixes = codeIssueToAnalysisErrorFixes(
Expand Down
2 changes: 0 additions & 2 deletions test/src/utils/node_utils_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ class AnnotatedNodeMock extends Mock implements AnnotatedNode {}

class CompilationUnitMock extends Mock implements CompilationUnit {}

class CharacterLocationMock extends Mock implements CharacterLocation {}

class LineInfoMock extends Mock implements LineInfo {}

class TokenMock extends Mock implements Token {}
Expand Down