Skip to content

Correct scope and use link to canonical term definition #6992

@eernstg

Description

@eernstg

Page URL

https://dart.dev/tools/linter-rules/specify_nonobvious_property_types

Page source

No response

Describe the problem

The documentation of specify_nonobvious_property_types needs to be updated: It describes the declarations of interest to be top-level variables and static variables. However, the lint actually targets all non-local variables. Also, instance variables are only targeted in the case where their type has not been obtained by override inference. Also, the page defines the notion of an obviously typed expression, but this should only be done once (and we have a definition in the glossary).

Expected fix

The page should say that the lint targets all non-local variables, and then explain that this means top-level variables, static variables, and instance variables.

Moreover, it should say that instance variables whose type is provided by override inference are not flagged as needing a type annotation.

Finally, the definition of 'obviously typed' expressions should be replaced by a link to this glossary entry: https://dart.dev/resources/glossary#obviously-typed.

Additional context

No response

I would like to fix this problem.

  • I will try and fix this problem on dart.dev.

Metadata

Metadata

Assignees

No one assigned

    Labels

    from.page-issueReported in a reader-filed concern

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions