Skip to content

Consider adding a lint for huge methods #58679

@alexmarkov

Description

@alexmarkov

In order to compile extremely huge methods compiler may spend a lot of time and memory, and may eventually run out of memory. Also, compiler may compile such methods with certain optimizations disabled or reduced (such as inlining). Huge methods are also harder to reason about and maintain.

We can add a lint to detect huge methods and warn users about that. Unlike other lints, this lint should be also enabled for auto-generated code, as it is often a source of huge methods.

Related: #48495

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.devexp-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