_fe_analyzer_shared 5.0.0

FE/analyzer shared code #

This package contains logic that is shared between the front_end and analyzer packages. It is intended solely to facilitate development of the Dart SDK, and is not intended for use by end users. In particular, this package has no public API, so no guarantee is made of compatibility between one version of the package and the next.

End users should consider using the analyzer package to analyze Dart source code.

Use this package as a library

1. Depend on it

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


dependencies:
  _fe_analyzer_shared: ^5.0.0

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.

Popularity:
Describes how popular the package is relative to other packages. [more]
99
Health:
Code health derived from static analysis. [more]
75
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
86
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.14

Analysis suggestions

Package not compatible with runtime flutter-web on web

Because:

  • package:_fe_analyzer_shared/src/parser/parser_main.dart that imports:
  • package:_fe_analyzer_shared/src/scanner/io.dart that imports:
  • dart:io

Package not compatible with runtime js

Because:

  • package:_fe_analyzer_shared/src/parser/parser_main.dart that imports:
  • package:_fe_analyzer_shared/src/scanner/io.dart that imports:
  • dart:io

Health suggestions

Fix lib/src/flow_analysis/flow_analysis.dart. (-25 points)

Analysis of lib/src/flow_analysis/flow_analysis.dart reported 72 hints, including:

line 30 col 7: Unnecessary new keyword.

line 35 col 7: Unnecessary new keyword.

line 39 col 5: Unnecessary new keyword.

line 45 col 7: Unnecessary new keyword.

line 60 col 16: Unnecessary new keyword.

Fix lib/src/messages/codes_generated.dart. (-25 points)

Analysis of lib/src/messages/codes_generated.dart reported 987 hints, including:

line 17 col 5: Avoid const keyword.

line 24 col 5: Avoid const keyword.

line 32 col 10: Unnecessary new keyword.

line 41 col 48: Avoid const keyword.

line 52 col 44: Avoid const keyword.

Fix lib/src/scanner/abstract_scanner.dart. (-25 points)

Analysis of lib/src/scanner/abstract_scanner.dart reported 68 hints, including:

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

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

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

line 92 col 24: Unnecessary new keyword.

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

Fix additional 48 files with analysis or formatting issues. (-308.73 points)

Additional issues in the following files:

  • lib/src/scanner/token.dart (316 hints)
  • lib/src/parser/parser_impl.dart (57 hints)
  • lib/src/base/errors.dart (50 hints)
  • lib/src/parser/identifier_context.dart (50 hints)
  • lib/src/testing/id_testing.dart (42 hints)
  • lib/src/scanner/token_impl.dart (29 hints)
  • lib/src/util/link.dart (25 hints)
  • lib/src/testing/id.dart (23 hints)
  • lib/src/parser/token_stream_rewriter.dart (21 hints)
  • lib/src/scanner/errors.dart (21 hints)
  • lib/src/scanner/utf8_bytes_scanner.dart (19 hints)
  • lib/src/scanner/reader.dart (18 hints)
  • lib/src/parser/quote.dart (16 hints)
  • lib/src/parser/stack_listener.dart (16 hints)
  • lib/src/parser/type_info.dart (15 hints)
  • lib/src/parser/type_info_impl.dart (15 hints)
  • lib/src/parser/util.dart (15 hints)
  • lib/src/messages/codes.dart (13 hints)
  • lib/src/parser/block_kind.dart (11 hints)
  • lib/src/parser/literal_entry_info_impl.dart (11 hints)
  • lib/src/scanner/string_scanner.dart (11 hints)
  • lib/src/util/link_implementation.dart (11 hints)
  • lib/src/scanner/keyword_state.dart (10 hints)
  • lib/src/testing/annotated_code_helper.dart (10 hints)
  • lib/src/sdk/allowed_experiments.dart (9 hints)
  • lib/src/testing/features.dart (9 hints)
  • lib/src/parser/identifier_context_impl.dart (7 hints)
  • lib/src/testing/id_generation.dart (7 hints)
  • lib/src/scanner/error_token.dart (6 hints)
  • lib/src/scanner/scanner.dart (6 hints)
  • lib/src/scanner/string_canonicalizer.dart (6 hints)
  • lib/src/scanner/io.dart (5 hints)
  • lib/src/base/syntactic_entity.dart (4 hints)
  • lib/src/messages/severity.dart (4 hints)
  • lib/src/scanner/scanner_main.dart (4 hints)
  • lib/src/parser/parser.dart (3 hints)
  • lib/src/parser/parser_main.dart (3 hints)
  • lib/src/parser/value_kind.dart (3 hints)
  • lib/src/scanner/interner.dart (3 hints)
  • lib/src/util/relativize.dart (3 hints)
  • lib/src/parser/class_member_parser.dart (2 hints)
  • lib/src/parser/listener.dart (2 hints)
  • lib/src/parser/literal_entry_info.dart (2 hints)
  • lib/src/scanner/recover.dart (2 hints)
  • lib/src/util/resolve_relative_uri.dart (2 hints)
  • lib/src/parser/assert.dart (1 hint)
  • lib/src/scanner/string_utilities.dart (1 hint)
  • lib/src/util/colors.dart (1 hint)

Maintenance issues and suggestions

Make sure dartdoc successfully runs on your package's source files. (-10 points)

exitCode: 255 stdout: Documenting _fe_analyzer_shared... Initialized dartdoc with 37 libraries in 30.4 seconds Validating docs... no issues found Documented 0 public libraries in 5.6 seconds stderr: Unhandled exception: dartdoc could not find any libraries to document #0 Dartdoc.generateDocs (package:dartdoc/dartdoc.dart:218:9)

Provide a file named CHANGELOG.md. (-20 points)

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

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.2 <3.0.0
meta ^1.0.2 1.2.2 1.3.0-nullsafety
Dev dependencies
test ^1.3.4