Skip to content

Getting Started

Add many_lints to your analysis_options.yaml:

plugins:
many_lints: ^1.1.0

The analysis server will automatically download and resolve the plugin from pub.dev.

Rules are opt-in. Choose whichever setup fits the project.

Start from a presetrecommended is the usual production default:

analysis_options.yaml
many_lints:
preset: recommended

Select rules manually — no preset is required:

analysis_options.yaml
many_lints:
rules:
avoid_equal_expressions: true
avoid_only_rethrow: true

Start from a preset and override it — add omitted rules or disable included ones:

analysis_options.yaml
many_lints:
preset: recommended
rules:
prefer_type_over_var: true
avoid_only_rethrow: false

Restart the Dart Analysis Server and you’re done.

There are five presets: core (35 near-certain-bug rules), recommended (97 rules — core plus likely defects and concrete runtime risks), opinionated (184 rules — recommended plus this package’s own style preferences), pedantic (241 rules — strict structure, naming, complexity and ordering) and none. See Configuration for manual selection, preset contents, and per-rule overrides.