Skip to content
pubscout

analyzer_testing

0.4.5, released 3 weeks ago by tools.dart.dev

Testing utilities and mocks for Dart analyzer and analysis server plugins.

$ flutter pub add analyzer_testing
Source repository

What it does

Provides testing helpers, mock package configurations, and resolution fixtures for developing analyzer tools and analysis server plugins. It assists in setting up test packages and configuring experimental features for Dart code analysis tests.

AI-written summary of version 0.4.5, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Writing automated tests for custom Dart analyzer plugins or lint rules
  • Testing analysis server extensions that need mock packages or resolution environments

Skip it when

  • Writing general Flutter unit, widget, or integration tests
  • Not developing plugins or tools directly integrated with the Dart analyzer

Strengths

  • Maintained directly as part of the Dart SDK ecosystem
  • Simplifies mocking package configurations and mock dependencies like Flutter stubs in analyzer tests

Weaknesses

  • Very tightly coupled to specific versions of the analyzer package (frequently requiring exact minor/patch versions)
  • Sparse documentation with no usage examples provided in the README

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
6

Requires aligning analyzer dependency versions strictly to match the package requirements.

Alternatives

Packages that do the same job and could replace analyzer_testing.

  • very_good_analysis

    Lint rules for Dart and Flutter used internally at Very Good Ventures.

  • leancode_lint

    An opinionated set of high-quality, robust, and up-to-date lint rules used at LeanCode.

  • golden_test

    A zero-dependency wrapper for Flutter golden tests with theme, locale, and multi-device support.

  • build_test

    Utilities for unit testing Dart build_runner builders in memory

Works with

Packages commonly used together with analyzer_testing: ones it builds on, ones built on it, and its own family.