e4868ca176
Currently, diagnostic codes associated with lints are named using `lower_snake_case`, while analyzer diagnonstic codes are named using `UPPER_SNAKE_CASE`. However, when the analyzer builds instances of the `ErrorProcessor` class, it always uses `UPPER_SNAKE_CASE` names. Some pieces of logic that matched up `ErrorProcessor`s to diagnostic codes accounted for this difference; others didn't. This led to a some buggy behaviors: - If an instance of `ErrorProcessor` got constructed outside of the analyzer (by an analyzer client using the analyzer public API), and it supplied a `lower_snake_case` name, then `ErrorProcessor.appliesTo` would only successfully match if the name referred to a lint. - The resolved correction producer base class `_BaseIgnoreDiagnostic` (which forms the basis for the quick fixes "Ignore '...' in `analysis_options.yaml`", "Ignore '...' for this line", and "Ignore '...' for the whole file") would only notice that a diagnostic was unignorable if the case matched exactly. In practice, this meant that when operating on instances of `ErrorProcessor` created by the analyzer, it wouldn't properly handle lints. These buggy behaviors have been fixed by: - Changing the `ErrorProcessor` constructor to always convert the `code` to lower case. - Changing all references to `ErrorProcessor.code` to assume lower case. Change-Id: I6a6a69645284f646e0c070fc2b55c4a90203d74a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/462863 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Paul Berry <paulberry@google.com>
analysis_server
A long-running process that provides analysis results to other tools.
The analysis server is designed to provide on-going analysis of one or more code bases as those code bases are changing.
Using the server
The analysis server is not intended to be used stand-alone, and therefore does not have a human-friendly user interface.
Clients (typically tools, such as an editor) are expected to run the analysis
server in a separate process and communicate with it using a JSON protocol. The
original protocol is specified in the file analysis_server/doc/api.html
and Language Server Protocol support is documented in
tool/lsp_spec/README.md.
Features and bugs
Please file feature requests and bugs at the issue tracker.