Skip to content

maranix/analyzer_kit

Repository files navigation

Analyzer Kit

Warning

The development of this package is currently on hold until support for augmented class lands. Until then consider using build_runner_hook for a more seamless code-gen experience.

A Dart workspace containing packages for annotation-driven code generation through the Dart Analyzer plugin system — no build runners required.

Packages

Package Description pub.dev
analyzer_kit Dart Analyzer plugin providing lint rules and quick fixes pub
analyzer_kit_annotation Annotations consumed by the plugin pub

Quick Start

# pubspec.yaml
dependencies:
  analyzer_kit_annotation: ^1.0.0+1
# analysis_options.yaml
plugins:
  analyzer_kit: 
    version: ^1.0.0+2
    diagnostics:
      data_class_annotation: true
      copy_with_annotation: true
      override_equality_annotation: true
      override_to_string_annotation: true
      serialize_annotation: true
      deserialize_annotation: true
import 'package:analyzer_kit_annotation/analyzer_kit_annotation.dart';

@dataClass
class User {
  final String name;
  final int age;

  User({required this.name, required this.age});

  // Apply IDE quick fix → generates copyWith, ==, hashCode, toString, toMap, fromMap
}

Development

This project is configured as a Dart workspace.

Getting Started

# Resolve dependencies for all packages
dart pub get

# Run analyzer_kit_annotation tests
cd packages/analyzer_kit_annotation && dart test

# Run analyzer_kit tests
cd packages/analyzer_kit && dart test

License

See LICENSE for details.

About

Helpful utilities and auto-completion features such as equality overrides, copyWith, data classes and etc using AnalyzerPlugin

Topics

Resources

License

Stars

Watchers

Forks

Contributors