8b23e3449d
The following classes are moved from `package:analyzer` to
`package:_fe_analyzer_shared`:
- `Diagnostic`
- `DiagnosticMessage`
- `DiagnosticMessageImpl`
The following declarations are also moved, since they are needed by
the above classes:
- `formatList`
- `Severity`
- `Source`
- `TimestampedData`
There is no change to the analyzer public API, and `export`
declarations have been added to the analyzer libraries that the
declarations have been moved from, so that code depending on these
declarations is unaffected.
These changes are part of a larger arc of work that introduces methods
`.withArguments` and `.at`, forming a literate API for reporting
analyzer errors that looks roughly like this:
diagnosticReporter.reportError(
ERROR_CODE.withArguments(...arguments...).at(...location...));
Moving this code into `_fe_analyzer_shared` is necessary because
scanner error codes are defined inside `_fe_analyzer_shared` (to allow
the scanner to be shared between the analyzer and CFE). Hence, to
avoid a circular depedency between `_fe_analyzer_shared` and
`analyzer`, the `.withArguments` and `.at` methods will need to live
in `_fe_analyzer_shared` too, as well as the classes representing the
diagnostic messages they create.
Note that there are some minor changes to
`pkg/analysis_server_plugin/api.txt` and
`pkg/analyzer_plugin/api.txt`; these have to do with the way the
`api.txt` generator chooses to report referenced elements, and don't
reflect actual API changes.
Change-Id: I6a6a6964a5c46f4a0205ce0d85620669ce55eb3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/444620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
93 lines
4.6 KiB
Plaintext
93 lines
4.6 KiB
Plaintext
package:analyzer_testing/analysis_rule/analysis_rule.dart:
|
|
error (function: ExpectedDiagnostic Function(DiagnosticCode, int, int, {Pattern? messageContains}))
|
|
AnalysisRuleTest (class extends PubPackageResolutionTest):
|
|
new (constructor: AnalysisRuleTest Function())
|
|
analysisRule (getter: String)
|
|
assertNoPubspecDiagnostics (method: Future<void> Function(String))
|
|
assertPubspecDiagnostics (method: Future<void> Function(String, List<ExpectedDiagnostic>))
|
|
correctionMessage (method: String Function(List<Diagnostic>))
|
|
lint (method: ExpectedDiagnostic Function(int, int, {Pattern? correctionContains, Pattern? messageContains, String? name}))
|
|
setUp (method: void Function())
|
|
unexpectedMessage (method: String Function(List<Diagnostic>))
|
|
package:analyzer_testing/experiments/experiments.dart:
|
|
experimentsForTests (static getter: List<String>)
|
|
experimentsForTests= (static setter: List<String>)
|
|
package:analyzer_testing/mock_packages/mock_packages.dart:
|
|
BlazeMockPackages (class extends Object):
|
|
instance (static getter: BlazeMockPackages)
|
|
addFlutter (method: void Function(ResourceProvider))
|
|
addMeta (method: void Function(ResourceProvider))
|
|
MockPackagesMixin (mixin on Object):
|
|
packagesRootPath (getter: String)
|
|
pathContext (getter: Context)
|
|
resourceProvider (getter: ResourceProvider)
|
|
addAngularMeta (method: Folder Function())
|
|
addFfi (method: Folder Function())
|
|
addFixnum (method: Folder Function())
|
|
addFlutter (method: Folder Function())
|
|
addFlutterTest (method: Folder Function())
|
|
addJs (method: Folder Function())
|
|
addKernel (method: Folder Function())
|
|
addMeta (method: Folder Function())
|
|
addPedantic (method: Folder Function())
|
|
addTestReflectiveLoader (method: Folder Function())
|
|
addUI (method: Folder Function())
|
|
addVectorMath (method: Folder Function())
|
|
package:analyzer_testing/package_root.dart:
|
|
packageRoot (static getter: String)
|
|
package:analyzer_testing/resource_provider_mixin.dart:
|
|
ResourceProviderMixin (mixin on Object):
|
|
pathContext (getter: Context)
|
|
resourceProvider (getter: ResourceProvider)
|
|
convertPath (method: String Function(String))
|
|
deleteFile (method: void Function(String))
|
|
deleteFolder (method: void Function(String))
|
|
fromUri (method: String Function(Uri))
|
|
getFile (method: File Function(String))
|
|
getFolder (method: Folder Function(String))
|
|
join (method: String Function(String, [String?, String?, String?, String?, String?, String?, String?]))
|
|
modifyFile2 (method: void Function(File, String))
|
|
newAnalysisOptionsYamlFile (method: File Function(String, String))
|
|
newBazelBuildFile (method: File Function(String, String))
|
|
newBuildGnFile (method: File Function(String, String))
|
|
newFile (method: File Function(String, String))
|
|
newFolder (method: Folder Function(String))
|
|
newLink (method: Link Function(String, String))
|
|
newPackageConfigJsonFile (method: File Function(String, String))
|
|
newPackageConfigJsonFileFromBuilder (method: File Function(String, PackageConfigFileBuilder))
|
|
newPubspecYamlFile (method: File Function(String, String))
|
|
newSinglePackageConfigJsonFile (method: void Function({required String name, required String packagePath}))
|
|
toUri (method: Uri Function(String))
|
|
toUriStr (method: String Function(String))
|
|
package:analyzer_testing/src/analysis_rule/pub_package_resolution.dart:
|
|
ExpectedDiagnostic (non-public)
|
|
PubPackageResolutionTest (non-public)
|
|
package:analyzer_testing/utilities/extensions/resource_provider.dart:
|
|
ResourceProviderExtension (extension on ResourceProvider):
|
|
convertPath (method: String Function(String))
|
|
package:analyzer_testing/utilities/utilities.dart:
|
|
analysisOptionsContent (function: String Function({List<String> experiments, List<String> includes, List<String> legacyPlugins, List<String> rules, bool strictCasts, bool strictInference, bool strictRawTypes, List<String> unignorableNames}))
|
|
pubspecYamlContent (function: String Function({List<String> dependencies, String? name, String? sdkVersion}))
|
|
dart:async:
|
|
Future (referenced)
|
|
dart:core:
|
|
List (referenced)
|
|
Object (referenced)
|
|
Pattern (referenced)
|
|
String (referenced)
|
|
Uri (referenced)
|
|
bool (referenced)
|
|
int (referenced)
|
|
package:_fe_analyzer_shared/src/base/errors.dart:
|
|
Diagnostic (referenced)
|
|
DiagnosticCode (referenced)
|
|
package:analyzer/file_system/file_system.dart:
|
|
File (referenced)
|
|
Folder (referenced)
|
|
Link (referenced)
|
|
ResourceProvider (referenced)
|
|
package:analyzer/utilities/package_config_file_builder.dart:
|
|
PackageConfigFileBuilder (referenced)
|
|
package:path/src/context.dart:
|
|
Context (referenced)
|