Skip to content

identify place to host canonical lints #58302

@pq

Description

@pq

Let the bike-shedding begin!

To start, here are a few proposals.

Proposal 1 : (new) package:canonical

Name

package:canonical (https://pub.dev/packages?q=canonical 👍 )

Structure

lib/
  analysis_options.yaml
  canonical_1.0.0.yaml
  recommend/
    canonical_1.0.0.yaml
    analysis_options.yaml

A few details:

  • analysis_options.yaml just include:s latest the same way pedantic currently does
  • lib/recommend/canonical_1.0.0.yaml has an include: of the root (scoring) lints and adds the recommended ones to it

Sample Uses

To get the latest scoring lints:

include: package:canonical/analysis_options.yaml

or to pin to a version:

include: package:canonical/analysis_options.1.0.0.yaml

Turning the dial up to the recommended lints looks like:

include: package:canonical/recommend/analysis_options.yaml
include: package:canonical/recommend/analysis_options.1.0.0.yaml

Proposal 2: package:pedantic

Alternatively, we could use the existing package:pedantic. (Cheers @munificent for this one.)

Structure

lib/
  analysis_options.yaml
  pedantic_1.0.0.yaml
  pub/
    pedantic_1.0.0.yaml
    analysis_options.yaml
  recommend/
    pedantic_1.0.0.yaml
    analysis_options.yaml

In this case the "root" one would probably have to remain the current google style.

Sample Uses

To get google style:

include: package:pedantic/analysis_options.yaml
include: package:pedantic/analysis_options.1.0.0.yaml

Pub scoring:

include: package:pedantic/pub/analysis_options.yaml
include: package:pedantic/pub/analysis_options.1.0.0.yaml

Recommended:

include: package:pedantic/recommend/analysis_options.yaml
include: package:pedantic/recommend/analysis_options.1.0.0.yaml

/fyi @bwilkerson @munificent @natebosch @jakemac53 @davidmorgan @mit-mit @lrhn for input

Metadata

Metadata

Assignees

Labels

devexp-linterIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.type-taskA well-defined stand-alone task

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions