Skip to content

Commit 750ecda

Browse files
srawlinsCommit Queue
authored and
Commit Queue
committed
Remove two underused methods from ResourceProviderMixin
Change-Id: I41f288f216e7db5a744d10a38074e104321e49f9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429220 Reviewed-by: Konstantin Shcheglov <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]>
1 parent 6b6ccf9 commit 750ecda

File tree

4 files changed

+10
-23
lines changed

4 files changed

+10
-23
lines changed

pkg/analysis_server/test/analysis_server_base.dart

+10-2
Original file line numberDiff line numberDiff line change
@@ -276,12 +276,20 @@ class PubPackageAnalysisServerTest extends ContextResolutionTest
276276
);
277277
}
278278

279+
/// Deletes the analysis options YAML file at [testPackageRootPath].
279280
void deleteTestPackageAnalysisOptionsFile() {
280-
deleteAnalysisOptionsYamlFile(testPackageRootPath);
281+
var path = join(testPackageRootPath, file_paths.analysisOptionsYaml);
282+
deleteFile(path);
281283
}
282284

285+
/// Deletes the `package_config.json` file at [testPackageRootPath].
283286
void deleteTestPackageConfigJsonFile() {
284-
deletePackageConfigJsonFile(testPackageRootPath);
287+
var filePath = join(
288+
testPackageRootPath,
289+
file_paths.dotDartTool,
290+
file_paths.packageConfigJson,
291+
);
292+
deleteFile(filePath);
285293
}
286294

287295
/// Returns the offset of [search] in [testFileContent].

pkg/analyzer_testing/api.txt

-2
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,8 @@ package:analyzer_testing/resource_provider_mixin.dart:
2929
pathContext (getter: Context)
3030
resourceProvider (getter: ResourceProvider)
3131
convertPath (method: String Function(String))
32-
deleteAnalysisOptionsYamlFile (method: void Function(String))
3332
deleteFile (method: void Function(String))
3433
deleteFolder (method: void Function(String))
35-
deletePackageConfigJsonFile (method: void Function(String))
3634
fromUri (method: String Function(Uri))
3735
getFile (method: File Function(String))
3836
getFolder (method: Folder Function(String))

pkg/analyzer_testing/lib/resource_provider_mixin.dart

-16
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ mixin ResourceProviderMixin {
3535
/// path context.
3636
String convertPath(String filePath) => resourceProvider.convertPath(filePath);
3737

38-
/// Deletes the analysis options YAML file at [directoryPath].
39-
void deleteAnalysisOptionsYamlFile(String directoryPath) {
40-
var path = join(directoryPath, file_paths.analysisOptionsYaml);
41-
deleteFile(path);
42-
}
43-
4438
/// Deletes the file at [path].
4539
void deleteFile(String path) {
4640
resourceProvider.getFile(convertPath(path)).delete();
@@ -51,16 +45,6 @@ mixin ResourceProviderMixin {
5145
resourceProvider.getFolder(convertPath(path)).delete();
5246
}
5347

54-
/// Deletes the `package_config.json` file at [directoryPath].
55-
void deletePackageConfigJsonFile(String directoryPath) {
56-
var path = join(
57-
directoryPath,
58-
file_paths.dotDartTool,
59-
file_paths.packageConfigJson,
60-
);
61-
deleteFile(path);
62-
}
63-
6448
/// Returns [uri] as a String.
6549
String fromUri(Uri uri) {
6650
return resourceProvider.pathContext.fromUri(uri);

pkg/linter/lib/src/rules/switch_on_type.dart

-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ class SwitchOnType extends LintRule {
2222
@override
2323
DiagnosticCode get diagnosticCode => LinterLintCode.switch_on_type;
2424

25-
@override
26-
LintCode get lintCode => LinterLintCode.switch_on_type;
27-
2825
@override
2926
void registerNodeProcessors(
3027
NodeLintRegistry registry,

0 commit comments

Comments
 (0)