Getting Started
Quick Setup
Section titled “Quick Setup”Add many_lints to your analysis_options.yaml:
plugins: many_lints: ^1.1.0The 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 preset — recommended is the usual production default:
many_lints: preset: recommended# many_lints.yaml — next to pubspec.yamlpreset: recommendedSelect rules manually — no preset is required:
many_lints: rules: avoid_equal_expressions: true avoid_only_rethrow: true# many_lints.yaml — next to pubspec.yamlrules: avoid_equal_expressions: true avoid_only_rethrow: trueStart from a preset and override it — add omitted rules or disable included ones:
many_lints: preset: recommended rules: prefer_type_over_var: true avoid_only_rethrow: false# many_lints.yaml — next to pubspec.yamlpreset: recommendedrules: prefer_type_over_var: true avoid_only_rethrow: falseRestart 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.