avoid_debug_print_in_release
An avoid_debug_print_in_release rule which forbids calling or referencing debugPrint function from flutter/foundation in release mode.
avoid_duplicate_code
A lint rule that detects duplicated code blocks (clones) across the project.
avoid_final_with_getter
Avoid using final private fields with getters.
avoid_global_state
Avoid top-level and static mutable variables.
avoid_late_keyword
Using late disables compile time safety for what would else be a nullable variable.
avoid_non_null_assertion
Rule which warns about usages of bang operator ("!") as it may result in unexpected runtime exceptions.
avoid_returning_widgets
A rule which warns about returning widgets from functions and methods.
avoid_similar_names
Warns about variables or parameters that have confusingly similar names within the same function scope (e.g., using numeric suffixes or single-letter modifiers like someClass1 and someClass2).
avoid_unnecessary_return_variable
An avoid_unnecessary_return_variable rule which forbids returning an immutable variable if it can be rewritten in return statement itself.
avoid_unnecessary_setstate
A rule which warns when setState is called inside initState, didUpdateWidget or build methods and when it's called from a sync method that is called inside those methods.
avoid_unnecessary_type_assertions
Warns about unnecessary usage of is and whereType operators.
avoid_unrelated_type_assertions
A avoid_unrelated_type_assertions rule which warns about unnecessary usage of as operator.
avoid_unused_parameters
Warns about unused function, method, constructor, or factory parameters.
avoid_using_api
A avoid_using_api rule which warns about usage of avoided APIs.
cyclomatic_complexity
Limit for the number of linearly independent paths through a program's source code.
double_literal_format
A double_literal_format rule which checks that double literals should begin with 0. instead of just ., and should not end with a trailing 0.
feature_envy
Warns if a method accesses fields or methods from a different class more often than from its own class (feature envy).
function_lines_of_code
An approximate metric of meaningful lines of source code inside a function, excluding blank lines and comments.
member_ordering
A lint which allows to enforce a particular class member ordering conventions.
named_parameters_ordering
A lint which allows to enforce a particular named parameter ordering conventions.
newline_before_return
Warns about missing newline before return in a code block.
no_empty_block
A no_empty_block rule which forbids having empty code blocks, including function/method bodies and conditionals, excluding catch blocks and to-do comments.
no_equal_then_else
Warns when "if"-"else" statements or ternary conditionals have identical if and else condition handlers.
no_magic_number
A no_magic_number rule which forbids having numbers without variable.
number_of_parameters
A number of parameters metric which checks whether we didn't exceed the maximum allowed number of parameters for a function or method.
prefer_conditional_expressions
Highlights simple "if" statements that can be replaced with conditional expressions.
prefer_early_return
A rule which highlights if statements that span the entire body of a function or loop, and suggests replacing them with a reversed boolean check with an early return or continue.
prefer_first
Warns about usage of iterable[0] or iterable.elementAt(0) instead of iterable.first.
prefer_last
Warns about usage of iterable[length - 1] or iterable.elementAt(length - 1) instead of iterable.last.
prefer_match_file_name
Warns about a mismatch between file name and first declared element inside.
proper_super_calls
Ensures that super calls are made in the correct order for the following StatefulWidget methods:
use_descriptive_names_for_type_parameters
A use_descriptive_names_for_type_parameters rule which warns about single-letter type parameter names when there are three or more type parameters.
use_nearest_context
A rule which checks that we use BuildContext from the nearest available scope.