Skip to content

Commit a2491e4

Browse files
srawlinsCommit Queue
authored andcommitted
analyzer_testing: bump to language 3.9
Change-Id: Iaf20cd6e78e3950935a1f2002bd5854a9d4108bf Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/447120 Commit-Queue: Samuel Rawlins <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]>
1 parent 46e36cc commit a2491e4

File tree

7 files changed

+16
-15
lines changed

7 files changed

+16
-15
lines changed

pkg/analyzer_testing/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## 0.1.3-dev
22

33
- Require version `8.2.0` of the `analyzer` package.
4+
- Require Dart SDK `^3.9.0`.
45

56
## 0.1.2
67

pkg/analyzer_testing/analysis_options.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ linter:
2626
- unnecessary_library_directive
2727
- unnecessary_parenthesis
2828
- unreachable_from_main
29+
- use_null_aware_elements

pkg/analyzer_testing/lib/mock_packages/package_content/flutter/lib/src/painting/text_style.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ class TextStyle {
116116
String fontFamily,
117117
List<String> fontFamilyFallback,
118118
String package,
119-
}) : fontFamily =
120-
package == null ? fontFamily : 'packages/$package/$fontFamily';
119+
}) : fontFamily = package == null
120+
? fontFamily
121+
: 'packages/$package/$fontFamily';
121122
}

pkg/analyzer_testing/lib/package_root.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ import 'package:path/path.dart' as path;
1111
String get packageRoot {
1212
// If the package root directory is specified on the command line using
1313
// `-DpkgRoot=...`, use that.
14-
const pkgRootVar =
15-
bool.hasEnvironment('pkgRoot') ? String.fromEnvironment('pkgRoot') : null;
14+
const pkgRootVar = bool.hasEnvironment('pkgRoot')
15+
? String.fromEnvironment('pkgRoot')
16+
: null;
1617
if (pkgRootVar != null) {
1718
var pkgRootPath = path.join(Directory.current.path, pkgRootVar);
1819
if (!pkgRootPath.endsWith(path.separator)) pkgRootPath += path.separator;

pkg/analyzer_testing/lib/resource_provider_mixin.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ import 'package:path/path.dart' as path;
2525
mixin ResourceProviderMixin {
2626
late final ResourceProvider resourceProvider =
2727
Platform.environment['TEST_ANALYZER_WINDOWS_PATHS'] == 'true'
28-
? MemoryResourceProvider(context: path.windows)
29-
: MemoryResourceProvider();
28+
? MemoryResourceProvider(context: path.windows)
29+
: MemoryResourceProvider();
3030

3131
/// The path context of [resourceProvider].
3232
path.Context get pathContext => resourceProvider.pathContext;
@@ -159,8 +159,8 @@ mixin ResourceProviderMixin {
159159
required String packagePath,
160160
required String name,
161161
}) {
162-
var builder =
163-
PackageConfigFileBuilder()..add(name: name, rootPath: packagePath);
162+
var builder = PackageConfigFileBuilder()
163+
..add(name: name, rootPath: packagePath);
164164
newPackageConfigJsonFileFromBuilder(packagePath, builder);
165165
}
166166

pkg/analyzer_testing/lib/src/analysis_rule/pub_package_resolution.dart

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,9 @@ class PubPackageResolutionTest with MockPackagesMixin, ResourceProviderMixin {
182182
List<String> get _collectionIncludedPaths => [workspaceRootPath];
183183

184184
/// The diagnostics that were computed during analysis.
185-
List<Diagnostic> get _diagnostics =>
186-
result.diagnostics
187-
.where(
188-
(e) => !ignoredDiagnosticCodes.any((c) => e.diagnosticCode == c),
189-
)
190-
.toList();
185+
List<Diagnostic> get _diagnostics => result.diagnostics
186+
.where((e) => !ignoredDiagnosticCodes.any((c) => e.diagnosticCode == c))
187+
.toList();
191188

192189
Folder get _sdkRoot => newFolder('/sdk');
193190

pkg/analyzer_testing/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version: 0.1.3-dev
44
repository: https://github.com/dart-lang/sdk/tree/main/pkg/analyzer_testing
55

66
environment:
7-
sdk: ^3.7.0
7+
sdk: ^3.9.0
88

99
resolution: workspace
1010

0 commit comments

Comments
 (0)