all_lint_rules icon indicating copy to clipboard operation
all_lint_rules copied to clipboard

no need to parse an HTML page for all of the lint rules

Open csells opened this issue 1 year ago • 2 comments

I notice that you're scraping the lint rules from a web page.

According to this comment, the lint rules are available as a yaml file here.

csells avatar Oct 04 '24 14:10 csells

Oh cool, thanks for the tip, I just grabbed this link for my own usage! 😃

rydmike avatar Oct 05 '24 19:10 rydmike

Using that file could be problematic because it has the lint rules of the current main branch, while the published version of the lints is for the stable version of the sdk. It can even contain rules for which a sdk version isn't published yet (e.g. current dev channel Dart version is 3.7.0-39.0.dev but it doesn't know about the specify_nonobvious_property_types rule).

So you'd have to use a tagged version (but now you need to get the version of the published stable Dart SDK from somewhere) to get the current stable version of the lints like: https://raw.githubusercontent.com/dart-lang/sdk/refs/tags/3.5.4/pkg/linter/example/all.yaml

denniskaselow avatar Oct 24 '24 02:10 denniskaselow