ALWAYS_DECLARE_RETURN_TYPES
Method should have return type
Codiga provides multiple sets of rules for 12+ languages. Below we provide a link and a description for all the rules supported by our platform. Note that not all the rules are being listed and described below.
Method should have return type
Always specify types
Invalid assignments
Asset does not exists
Avoid bool literals in condition
Avoid defining a class that contains only static members.
Avoid escaping inner quotes by converting surrounding quotes.
Avoid using `forEach` with a function literal.
Don't explicitly initialize variables to null.
Avoid positional boolean parameters.
Avoid `print` calls in production code.
Avoid redundant argument values.
Avoid return types on setters.
Avoid unnecessary containers.
Avoid async functions that return void.
Avoid using web-only libraries outside Flutter web plugin packages.
await' should only apply to futures
The body might complete normally
Name types using UpperCamelCase.
Don't cast a nullable value to a non nullable type.
The name isn't a type
Close instances of `dart.core.Sink`.\n
Const variables must be initialized with a constant value.
Arguments of a constant creation must be constant expressions.
Cannot infer type
The name 'BubbleStyle' isn't a class.\n
Dead code.
Dead code on catch subtype.
The left operand can't be null.
The default 'List' constructor isn't available when null safety is enabled.
Depend on referenced packages.
Member is deprecated and shouldn't be used. This property is no longer used
Import ordering
Duplicate import.
Avoid empty catch blocks.
Use `;` instead of `{}` for empty constructor bodies.
Detect empty statements (dead code)
Put a single newline at end of file.
Expected to find '['.
Classes can only extend other classes.
Too many positional arguments.
Name source files using `lowercase\_with\_underscores`.
Invalid return type
Override `hashCode` if overriding `==`
Illegal assignment to non-assignable expression.
Don't import implementation files from another package.
Classes and mixins can only implement other classes and mixins.
Legacy library
Include file not found
Invalid annotation target
Invalid assignments
Invalid constant value
The receiver can't be null because of short-circuiting
Invalid override
Invalid use of protected members
Conditions should not unconditionally evaluate to `true` or to `false`.
Join return statement with assignment when possible.
Use `lowercase\_with\_underscores` when specifying a library prefix.
List element type not assignable
Missing selector
Missing default value for parameter
Missing case clause for 'null'.
Expected an identifier.
Missing required argument
Missing required parameters
Missing return value
Classes can only mix in mixins and classes.
Mixin can only be applied to class.
Must be immutable
This method overrides a method annotated as '@mustCallSuper' in 'State'
The class doesn't have a default constructor.
No default super constructor
Missing concrete implementations of methods
Conditions must have a static type of 'bool'
Case expressions must be constant
The default value of an optional parameter must be constant
Name non-constant identifiers using lowerCamelCase
The values in a const list literal must be constants
The values in a const map literal must be constant
The name isn't a type so it can't be used as a type argument
The name isn't a type and can't be used in an on-catch clause.
Noop primitive operations.
The non-nullable local variable must be assigned before it can be used.
Non-nullable instance field must be initialized.
The non-nullable variable must be initialized.
A potentially nullable type can't be used in an 'on' clause because it isn't valid to throw a nullable expression.
Don't override fields.
The field doesn't override an inherited getter or setter.
Positional arguments must occur before named arguments.
Prefer const with constant constructors.
Prefer declaring const constructors on `@immutable` classes
Prefer const over final for declarations
Prefer const literals as parameters of constructors on @immutable classes.
Prefer final in for-each loop variable if reference is not reassigned.
Prefer final for variable declarations if they are not reassigned.
Prefer if elements to conditional expressions where possible.
Prefer using if null operators.
Use initializing formals when possible.
Use interpolation to compose strings and values.
Use isEmpty instead of length\n
Use `isNotEmpty` for Iterables and Maps.
Prefer null aware method calls.
Prefer typing uninitialized variables and fields.
Name isn't a type and can't be used in a redirected constructor.
Missing a required trailing comma.
Invalid return type
Invalid return type from closure
SizedBox for whitespace.
Sort child properties last in widget instance creations.
Sort pub dependencies.
Type annotate public APIs.
Type arguments do not match bounds
Undefined name
Method can't be unconditionally invoked because the receiver can be 'null'.
Undefined constructor
Undefined getter
Named parameter undefined
Undefined operator
Undefined setter
Undefined super member
Avoid using braces in interpolation when not needed.
Unnecessary cast.
Unnecessary new keyword.
Uneccessary non null assertion
Unnecessary null checks
The operand can't be null
Unnecessary parenthesis
Avoid using unnecessary statements
Unnecessary string interpolation
Unecessary this
The '===' operator is not supported
Unused catch clause
Stack trace not used
Unused element
Unused fiel
Unused import
Unused label
Unused local variable
URI has not been generated
Use build context synchronuously
Use late for private members with non-nullable type.
Use named constants
Use of void results
Use string buffers to compose strings
Avoid leading underscores for local identifiers.
Prefer using lowerCamelCase for constant names.
Directives must appear before any declarations.
Use Flutter TODO format.
Avoid leading underscores for library prefixes.
The name of a factory constructor must be the same as the name of the immediately enclosing class.
We use cookies to improve your site experience, including analytics cookies to understand how you use our product and design better experiences. Please read our Cookie Policy.