analysis_server_lib 0.1.9

analysis_server_lib #

A library to access Dart's analysis server API.

Build Status

What is the analysis server? #

The analysis server is a long-running process that provides analysis results to other tools. It is designed to provide on-going analysis of one or more code bases as those code bases are changing.

Using the server #

Clients (typically tools, such as an editor) are expected to run the analysis server in a separate process and communicate with it over a JSON protocol. The protocol is specified here.

Here's a simple example of starting and communicating with the server:

import 'package:analysis_server_lib/analysis_server_lib.dart';

main() async {
  AnalysisServer server = await AnalysisServer.create();
  await server.server.onConnected.first;

  VersionResult version = await server.server.getVersion();

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  analysis_server_lib: ^0.1.9

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:analysis_server_lib/analysis_server_lib.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Mar 30, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6

Health suggestions

Fix lib/analysis_server_lib.dart. (-25 points)

Analysis of lib/analysis_server_lib.dart reported 255 hints, including:

line 25 col 24: Unnecessary new keyword.

line 66 col 39: Unnecessary new keyword.

line 98 col 29: Unnecessary new keyword.

line 114 col 28: Unnecessary new keyword.

line 116 col 38: Unnecessary new keyword.

Maintenance issues and suggestions

Provide a file named (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

The package description is too short. (-13 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and analysis_server_lib.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
logging ^0.11.0 0.11.4
path ^1.0.0 1.6.4
Dev dependencies
html ^0.14.0
pedantic ^1.7.0
test ^1.0.0