analyzer_plugin 0.0.1-alpha.6

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 56

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.

Changelog #

0.0.1-alpha.4 #

  • Upgrade the Dart SDK version contraint

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.6

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.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]
68
Health:
Code health derived from static analysis. [more]
25
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
72
Overall:
Weighted score of the above. [more]
56
Learn more about scoring.

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

  • Dart: 2.1.0
  • pana: 0.12.13

Platforms

Detected platforms: Flutter, other

Platform components identified in package: io, isolate.

Health suggestions

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

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

line 36 col 3: Avoid return types on setters.

line 133 col 3: Avoid return types on setters.

line 146 col 3: Avoid return types on setters.

line 159 col 3: Avoid return types on setters.

line 174 col 3: Avoid return types on setters.

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

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

line 39 col 3: Avoid return types on setters.

line 52 col 3: Avoid return types on setters.

line 151 col 3: Avoid return types on setters.

line 164 col 3: Avoid return types on setters.

line 265 col 3: Avoid return types on setters.

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

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

line 140 col 22: Use = to separate a named parameter from its default value.

line 183 col 19: Use = to separate a named parameter from its default value.

line 229 col 19: Use = to separate a named parameter from its default value.

line 230 col 19: Use = to separate a named parameter from its default value.

line 231 col 20: Use = to separate a named parameter from its default value.

Fix additional 12 files with analysis or formatting issues. (-16.83 points)

Additional issues in the following files:

  • lib/utilities/change_builder/change_builder_dart.dart (12 hints)
  • lib/src/utilities/completion/element_suggestion_builder.dart (4 hints)
  • lib/src/utilities/change_builder/change_builder_core.dart (2 hints)
  • lib/src/utilities/completion/completion_core.dart (2 hints)
  • lib/src/utilities/completion/suggestion_builder.dart (2 hints)
  • lib/src/utilities/visitors/local_declaration_visitor.dart (2 hints)
  • lib/utilities/completion/completion_core.dart (2 hints)
  • lib/utilities/completion/inherited_reference_contributor.dart (2 hints)
  • lib/utilities/completion/suggestion_builder.dart (2 hints)
  • lib/utilities/fixes/fixes.dart (2 hints)
  • lib/plugin/plugin.dart (1 hint)
  • lib/src/utilities/completion/optype.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 >=1.8.0 <3.0.0
analyzer ^0.34.2 0.34.3 0.35.1
charcode ^1.1.0 1.1.2
html ^0.13.1 0.13.3+3
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.0.8
collection 1.14.11
convert 2.1.1
crypto 2.0.6
csslib 0.14.6
front_end 0.1.9+1 0.1.11
glob 1.1.7
kernel 0.3.9+1 0.3.11
logging 0.11.3+2
package_config 1.0.5
plugin 0.2.0+3
source_span 1.5.4
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6
utf 0.9.0+5
watcher 0.9.7+10
yaml 2.1.15
Dev dependencies
test ^1.0.0
test_reflective_loader ^0.1.8