Skip to content

type_annotate_public_apis ignores constructors #62241

@munificent

Description

@munificent

With an analysis_options.yaml file like:

linter:
  rules:
    - type_annotate_public_apis

When I analyze:

class A {
  A(foo) {}
  void method(blah) {}
}

I correctly get a lint error on blah, but not on foo.

Looking at the lint implementation, I see it visiting functions, methods, variables, and even function types, but it looks like it just doesn't implement visitConstructorDeclaration().

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-linterIssues with the analyzer's support for the linter packagelinter-false-negativeIssues related to lint rules that fail to report a problem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions