agent_lints 0.2.0
agent_lints: ^0.2.0 copied to clipboard
Agent-first custom lint for Dart and Flutter. Define project rules in YAML; get instructional diagnostics from the CLI, dart analyze and your IDE.
0.2.0 #
Breaking: the rule form is flat (config version: 2). One node key per rule
(use, constructor, call, ref, import, deny_imports, class,
function, variable, literal, file); attributes, args: and context (parent,
inside, not_inside, contains, not_contains, except) are sibling
lines; no match: wrapper. banned is use, imports is deny_imports,
naming is a name pattern ({ not: .. }, { not_style: snake_case }) on
the declaration, files is include.
constructorreplacesnew;fromis the package attribute (packagestill accepted);from: flutteralso coversmaterial_ui,cupertino_uianddart:ui.hintreplacessuggest(rule field, CLI label, JSON and SARIF keys, IDE correction).args:shorthands:present,absent, a value, a list.messageis optional; defaults to a sentence built fromuse_instead.explain --kindsis generated from the node specs.
0.1.2 #
- README: context around the example.
0.1.1 #
- README: absolute documentation links so they work on pub.dev.
0.1.0 #
Initial release. Under active development: the rule language may still change before 1.0.
- Rules in
agent_lints.yaml:match:(node kindsnew,call,ref,import,class,function,variable,literal,file;argsconstraints;inside/not_inside/contains/not_contains;any/all/not), plusbanned,importsandnamingsugar. - Messages with
{{placeholders}},values:lists with{{allowed}}and{{closest}},examples: { bad, good }. - CLI:
check(agent / human / json / sarif output,--changed,--files,--rule,--show-suppressed),validate,explain,test,init. - Analyzer plugin for
dart analyze,flutter analyzeand IDEs; every rule id is a diagnostic code with the configured severity. filematcher with line and code-line bounds;explain,testandinitcommands; documentation underdocs/.// ignore: agent_lints/<rule> -- reasonsuppression,unused_ignoreandignore_without_reasonreports.