Skip to content

package_api_docs: fix or remove? #57310

Closed
@pylaligand

Description

@pylaligand

Here's a simple package:

my_package
    - pubspec.yaml
    - .analysis_options
    - lib
        - class.dart 

with .analysis_options:

linter:
  rules:
    - always_declare_return_types
    - package_api_docs

and class.dart:

class ThisIsATest {
  returnSomething() {
    return 314;
  }
}

If I run the analyzer, I don't get any lint for the lack of documentation:

$ dartanalyzer lib/*.dart
Analyzing [lib/class.dart]...
[lint] Declare method return types. (/work/turquoise/sysui/src/toto/lib/class.dart, line 2, col 3)
1 lint found.

$ dartanalyzer --version
dartanalyzer version 1.15.0

Based on the documentation, I would expect to get a message about ThisIsATest and returnSomething.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onarea-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-negativetype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)type-questionA question about expected behavior or functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions