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

Commit a199952

Browse files
authored
Merge fcf85fa into dea06a2
2 parents dea06a2 + fcf85fa commit a199952

File tree

7 files changed

+8
-6
lines changed

7 files changed

+8
-6
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44

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

1011
## 4.7.0
1112

lib/src/analyzer_plugin/analyzer_plugin.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ class AnalyzerPlugin extends ServerPlugin {
142142
) async {
143143
try {
144144
final driver = driverForPath(parameters.file) as AnalysisDriver;
145+
// ignore: deprecated_member_use
145146
final analysisResult = await driver.getResult2(parameters.file);
146147

147148
if (analysisResult is! ResolvedUnitResult) {

lib/src/analyzer_plugin/analyzer_plugin_utils.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ plugin.AnalysisErrorFixes codeIssueToAnalysisErrorFixes(
4343
plugin.SourceChange(issue.suggestion!.comment, edits: [
4444
plugin.SourceFileEdit(
4545
fileWithIssue,
46+
// ignore: deprecated_member_use
4647
unitResult.libraryElement.source.modificationStamp,
4748
edits: [
4849
plugin.SourceEdit(

lib/src/analyzers/lint_analyzer/lint_analyzer.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,6 @@ class LintAnalyzer {
370370
return functionRecords;
371371
}
372372

373-
bool _isSupported(AnalysisResult result) =>
373+
bool _isSupported(FileResult result) =>
374374
result.path.endsWith('.dart') && !result.path.endsWith('.g.dart');
375375
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ environment:
1010
sdk: ">=2.14.0 <3.0.0"
1111

1212
dependencies:
13-
analyzer: ">=2.4.0 <2.8.0"
13+
analyzer: ">=2.4.0 <2.9.0"
1414
analyzer_plugin: ^0.8.0
1515
ansicolor: ^2.0.1
1616
args: ^2.0.0

test/src/analyzer_plugin/analyzer_plugin_utils_test.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ void main() {
4747
when(() => libraryElement.source).thenReturn(source);
4848
when(() => resolvedUnitResult.libraryElement)
4949
.thenReturn(libraryElement);
50+
// ignore: deprecated_member_use
5051
when(() => source.modificationStamp).thenReturn(modificationStamp);
5152

5253
final fixes = codeIssueToAnalysisErrorFixes(

test/src/utils/node_utils_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ class AnnotatedNodeMock extends Mock implements AnnotatedNode {}
1212

1313
class CompilationUnitMock extends Mock implements CompilationUnit {}
1414

15-
class CharacterLocationMock extends Mock implements CharacterLocation {}
16-
1715
class LineInfoMock extends Mock implements LineInfo {}
1816

1917
class TokenMock extends Mock implements Token {}

0 commit comments

Comments
 (0)