Skip to content

package-level lint: unused, unexposed public members #57724

Open
@srawlins

Description

@srawlins

I'd like a lint rule that flags public library members (classes, top-level variables, typedefs, functions) and public class members (all the usual suspects) that are unused within their package, and not exposed from a library in the lib/ directory.

// lib/foo.dart

export 'src/foo.dart' show usedConstant;
// lib/src/foo.dart

// BAD
final unusedConstant = "CONSTANT";

final usedConstant = "CONSTANT";

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.customer-google3devexp-linterIssues with the analyzer's support for the linter packagelinter-lint-proposaltype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions