Fixes https://github.com/dart-lang/sdk/issues/54247 The main piece of this CL is a rewrite of the `ignoredElements` extension on CommentToken. This was a private extension getter, but is made public now for two reasons: first is to reference it in tests, and second is to make it available for a new lint rule in an upcoming CL. The new implementation drops all use of RegExp in order to more precisely track when we may be at the end of a list of diagnostic names and/or types. So the functional change here is that a diagnostic name or type followed by whitespace instead of a comma marks the end of the list. Any characters following that whitespace are not parsed, as they are considered freeform comment text. While the new implementation parses a comment code-unit-by-code-unit, it is still a rather concise impl. * Rename DiagnosticName and DiagnosticType to IgnoredDiagnosticName and IgnoredDiagnosticType; these names make more sense to me, specifically when they are used outside of the ignore_info.dart file. * I introduce a new test file, ignore_info_test, to capture these various parsing particulars, that aren't specifically concerned with matching an ignore comment with a diagnostic. A few test cases from ErrorSuppressionTest are moved over here. * A number of String (well, int, technically) helper functions are moved to analyzer, along with their tests. Fixes https://github.com/dart-lang/sdk/issues/54247 Change-Id: Ife08d448a4e03b8a55b183d88a3ea8d07812fbdc Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/363820 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Samuel Rawlins <srawlins@google.com>
A framework for building plugins for the analysis server.
Usage
Note: The plugin support is not currently available for general use.
Plugins are written in Dart and are run in the same VM as the analysis server. The analysis server runs each plugin in a separate isolate and communicates with the plugin using a plugin API. This API is similar to the API used by the analysis server to communicate with clients.
Plugins are automatically discovered and run by the analysis server.
This package contains support code to make it easier to write a plugin. There is a tutorial describing how to use the support in this package.
Support
Post issues and feature requests on the issue tracker.
Questions and discussions are welcome at the Dart Analyzer Discussion Group.
License
See the LICENSE file.