analyzer_plugin 0.0.1-alpha.8

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 49

analyzer_plugin #

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.

0.0.1-alpha.8 #

  • Support the latest pkg:analyzer.

0.0.1-alpha.7 #

  • Remove CompletionSuggestion.elementUri, replaced with AvailableSuggestionSet.
  • Remove 'importUri' from CompletionSuggestion.
  • Include type parameters into suggested code completions.

0.0.1-alpha.4 #

  • Upgrade the Dart SDK version constraint

0.0.1 #

  • Initial version

Use this package as a library

1. Depend on it

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


dependencies:
  analyzer_plugin: ^0.0.1-alpha.8

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


import 'package:analyzer_plugin/channel/channel.dart';
import 'package:analyzer_plugin/plugin/assist_mixin.dart';
import 'package:analyzer_plugin/plugin/completion_mixin.dart';
import 'package:analyzer_plugin/plugin/fix_mixin.dart';
import 'package:analyzer_plugin/plugin/folding_mixin.dart';
import 'package:analyzer_plugin/plugin/highlights_mixin.dart';
import 'package:analyzer_plugin/plugin/kythe_mixin.dart';
import 'package:analyzer_plugin/plugin/navigation_mixin.dart';
import 'package:analyzer_plugin/plugin/occurrences_mixin.dart';
import 'package:analyzer_plugin/plugin/outline_mixin.dart';
import 'package:analyzer_plugin/plugin/plugin.dart';
import 'package:analyzer_plugin/protocol/protocol.dart';
import 'package:analyzer_plugin/protocol/protocol_common.dart';
import 'package:analyzer_plugin/protocol/protocol_constants.dart';
import 'package:analyzer_plugin/protocol/protocol_generated.dart';
import 'package:analyzer_plugin/starter.dart';
import 'package:analyzer_plugin/utilities/analyzer_converter.dart';
import 'package:analyzer_plugin/utilities/assist/assist.dart';
import 'package:analyzer_plugin/utilities/assist/assist_contributor_mixin.dart';
import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
import 'package:analyzer_plugin/utilities/change_builder/change_workspace.dart';
import 'package:analyzer_plugin/utilities/completion/completion_core.dart';
import 'package:analyzer_plugin/utilities/completion/inherited_reference_contributor.dart';
import 'package:analyzer_plugin/utilities/completion/relevance.dart';
import 'package:analyzer_plugin/utilities/completion/suggestion_builder.dart';
import 'package:analyzer_plugin/utilities/completion/type_member_contributor.dart';
import 'package:analyzer_plugin/utilities/fixes/fix_contributor_mixin.dart';
import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
import 'package:analyzer_plugin/utilities/folding/folding.dart';
import 'package:analyzer_plugin/utilities/generator.dart';
import 'package:analyzer_plugin/utilities/highlights/highlights.dart';
import 'package:analyzer_plugin/utilities/kythe/entries.dart';
import 'package:analyzer_plugin/utilities/navigation/navigation.dart';
import 'package:analyzer_plugin/utilities/occurrences/occurrences.dart';
import 'package:analyzer_plugin/utilities/outline/outline.dart';
import 'package:analyzer_plugin/utilities/pair.dart';
import 'package:analyzer_plugin/utilities/range_factory.dart';
import 'package:analyzer_plugin/utilities/subscriptions/subscription_manager.dart';
  
Version Uploaded Documentation Archive
0.0.1-alpha.8 Apr 24, 2019 Go to the documentation of analyzer_plugin 0.0.1-alpha.8 Download analyzer_plugin 0.0.1-alpha.8 archive
0.0.1-alpha.7 Mar 6, 2019 Go to the documentation of analyzer_plugin 0.0.1-alpha.7 Download analyzer_plugin 0.0.1-alpha.7 archive
0.0.1-alpha.6 Jan 18, 2019 Go to the documentation of analyzer_plugin 0.0.1-alpha.6 Download analyzer_plugin 0.0.1-alpha.6 archive
0.0.1-alpha.5 Oct 22, 2018 Go to the documentation of analyzer_plugin 0.0.1-alpha.5 Download analyzer_plugin 0.0.1-alpha.5 archive
0.0.1-alpha.4 Jul 23, 2018 Go to the documentation of analyzer_plugin 0.0.1-alpha.4 Download analyzer_plugin 0.0.1-alpha.4 archive
0.0.1-alpha.3 May 30, 2018 Go to the documentation of analyzer_plugin 0.0.1-alpha.3 Download analyzer_plugin 0.0.1-alpha.3 archive
0.0.1-alpha.2 Mar 26, 2018 Go to the documentation of analyzer_plugin 0.0.1-alpha.2 Download analyzer_plugin 0.0.1-alpha.2 archive
0.0.1-alpha.1 Mar 12, 2018 Go to the documentation of analyzer_plugin 0.0.1-alpha.1 Download analyzer_plugin 0.0.1-alpha.1 archive
0.0.1-alpha.0 Aug 25, 2017 Go to the documentation of analyzer_plugin 0.0.1-alpha.0 Download analyzer_plugin 0.0.1-alpha.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
69
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
72
Overall:
Weighted score of the above. [more]
49
Learn more about scoring.

We analyzed this package on Apr 24, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.2.0
  • pana: 0.12.14

Platforms

Detected platforms: Flutter, other

Platform components identified in package: io, isolate.

Health suggestions

Fix lib/protocol/protocol_common.dart. (-89.57 points)

Analysis of lib/protocol/protocol_common.dart reported 451 hints, including:

line 15 col 1: Prefer using /// for doc comments.

line 28 col 3: Prefer using /// for doc comments.

line 33 col 3: Prefer using /// for doc comments.

line 36 col 3: Avoid return types on setters.

line 95 col 1: Prefer using /// for doc comments.

Fix lib/protocol/protocol_generated.dart. (-87 points)

Analysis of lib/protocol/protocol_generated.dart reported 407 hints, including:

line 16 col 1: Prefer using /// for doc comments.

line 31 col 3: Prefer using /// for doc comments.

line 36 col 3: Prefer using /// for doc comments.

line 39 col 3: Avoid return types on setters.

line 44 col 3: Prefer using /// for doc comments.

Fix lib/src/utilities/change_builder/change_builder_dart.dart. (-24.47 points)

Analysis of lib/src/utilities/change_builder/change_builder_dart.dart reported 56 hints, including:

line 30 col 1: Prefer using /// for doc comments.

line 35 col 3: Prefer using /// for doc comments.

line 40 col 3: Prefer using /// for doc comments.

line 96 col 1: Prefer using /// for doc comments.

line 102 col 3: Prefer using /// for doc comments.

Fix additional 55 files with analysis or formatting issues. (-309.92 points)

Additional issues in the following files:

  • lib/plugin/plugin.dart (55 hints)
  • lib/protocol/protocol.dart (43 hints)
  • lib/utilities/change_builder/change_builder_dart.dart (40 hints)
  • lib/src/utilities/change_builder/change_builder_core.dart (34 hints)
  • lib/src/protocol/protocol_internal.dart (30 hints)
  • lib/src/utilities/completion/optype.dart (28 hints)
  • lib/src/channel/isolate_channel.dart (25 hints)
  • lib/utilities/change_builder/change_builder_core.dart (25 hints)
  • lib/src/utilities/completion/completion_target.dart (23 hints)
  • lib/utilities/fixes/fixes.dart (23 hints)
  • lib/utilities/completion/type_member_contributor.dart (22 hints)
  • lib/utilities/completion/completion_core.dart (21 hints)
  • lib/utilities/assist/assist.dart (20 hints)
  • lib/utilities/navigation/navigation.dart (17 hints)
  • lib/utilities/range_factory.dart (15 hints)
  • lib/utilities/analyzer_converter.dart (14 hints)
  • lib/utilities/folding/folding.dart (14 hints)
  • lib/utilities/highlights/highlights.dart (14 hints)
  • lib/utilities/outline/outline.dart (14 hints)
  • lib/src/utilities/completion/completion_core.dart (13 hints)
  • lib/utilities/kythe/entries.dart (13 hints)
  • lib/utilities/occurrences/occurrences.dart (13 hints)
  • lib/src/utilities/completion/element_suggestion_builder.dart (11 hints)
  • lib/channel/channel.dart (10 hints)
  • lib/src/utilities/completion/suggestion_builder.dart (7 hints)
  • lib/src/utilities/navigation/navigation.dart (6 hints)
  • lib/src/utilities/occurrences/occurrences.dart (6 hints)
  • lib/src/utilities/visitors/local_declaration_visitor.dart (6 hints)
  • lib/utilities/completion/inherited_reference_contributor.dart (6 hints)
  • lib/utilities/subscriptions/subscription_manager.dart (6 hints)
  • lib/src/utilities/fixes/fixes.dart (5 hints)
  • lib/src/utilities/folding/folding.dart (5 hints)
  • lib/src/utilities/kythe/entries.dart (5 hints)
  • lib/src/utilities/outline/outline.dart (5 hints)
  • lib/src/utilities/string_utilities.dart (5 hints)
  • lib/utilities/fixes/fix_contributor_mixin.dart (5 hints)
  • lib/utilities/generator.dart (5 hints)
  • lib/src/utilities/assist/assist.dart (4 hints)
  • lib/src/utilities/highlights/highlights.dart (4 hints)
  • lib/utilities/completion/suggestion_builder.dart (4 hints)
  • lib/plugin/assist_mixin.dart (3 hints)
  • lib/plugin/completion_mixin.dart (3 hints)
  • lib/plugin/navigation_mixin.dart (3 hints)
  • lib/src/driver.dart (3 hints)
  • lib/starter.dart (3 hints)
  • lib/utilities/assist/assist_contributor_mixin.dart (3 hints)
  • lib/plugin/fix_mixin.dart (2 hints)
  • lib/plugin/folding_mixin.dart (2 hints)
  • lib/plugin/highlights_mixin.dart (2 hints)
  • lib/plugin/kythe_mixin.dart (2 hints)
  • lib/plugin/occurrences_mixin.dart (2 hints)
  • lib/plugin/outline_mixin.dart (2 hints)
  • lib/src/utilities/documentation.dart (2 hints)
  • lib/src/utilities/null_string_sink.dart (1 hint)
  • lib/utilities/pair.dart (1 hint)

Maintenance suggestions

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 analyzer_plugin.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Package is pre-release. (-5 points)

Pre-release versions should be used with caution; their API can change in breaking ways.

The package description is too short. (-3 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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
analyzer >=0.35.3 <0.37.0 0.36.2
charcode ^1.1.0 1.1.2
html >=0.13.1 <0.15.0 0.14.0+1
meta ^1.0.2 1.1.7
path ^1.4.1 1.6.2
pub_semver ^1.3.2 1.4.2
Transitive dependencies
args 1.5.1
async 2.2.0
collection 1.14.11
convert 2.1.1
crypto 2.0.6
csslib 0.15.0
front_end 0.1.17
glob 1.1.7
kernel 0.3.17
package_config 1.0.5
source_span 1.5.5
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6
watcher 0.9.7+10
yaml 2.1.15
Dev dependencies
analysis_tool
test ^1.0.0
test_reflective_loader ^0.1.8