Files
sdk/pkg/analysis_server
Sam Rawlins 6c6cba8dff DAS: Tidy the replay script
Previously, the Driver class here was instantiated with no parameters,
as an empty object, and then in the `_processCommandLine` method
(called once by `run`), we set all the fields. These fields in
practice are immutable and do not represent any "state" of running the
Driver. This is not taking advantage of any OO practices or our best
practices of using final fields.

This CL moves the argument-parsing logic to a static method, `Driver.fromArgs`. This can't be a factory constructor because some
args do result in no Driver being returned (`--help`, not enough args,
and an exception being thrown). Then the values of the flags can be
final fields, set in the private constructor. Then, `run()` does not
set fields or read arguments; it just runs :D

Additionally, the fields can be made private.

Additionally, the command-line argument name constants should be
lowerCamelCase.

Additionally, `_createArgParser` does not need to be an instance
method; it makes more sense as a static getter.

Change-Id: If3b0363859f35b87dfdbcedf43b472bf5689b200
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/454402
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-10-20 20:59:40 -07:00
..
2025-10-10 11:30:11 -07:00
2025-10-20 20:59:40 -07:00
2025-10-10 09:50:30 -07:00
2025-09-03 12:56:29 -07:00

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.