facebook pixelDART Static Code Analysis Rules
BACK TO LIST

Dart rules

Codiga provides multiple set 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.

      ARGUMENT_TYPE_NOT_ASSIGNABLE

      Code style
      Medium

      Invalid assignments

      ASSET_DOES_NOT_EXIST

      Code style
      Medium

      Asset does not exists

      BODY_MIGHT_COMPLETE_NORMALLY

      Code style
      Medium

      The body might complete normally

      CAST_TO_NON_TYPE

      Code style
      Medium

      The name isn't a type

      CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE

      Code style
      Medium

      Const variables must be initialized with a constant value.

      CONST_WITH_NON_CONSTANT_ARGUMENT

      Code style
      Medium

      Arguments of a constant creation must be constant expressions.

      COULD_NOT_INFER

      Code style
      Medium

      Cannot infer type

      CREATION_WITH_NON_TYPE

      Code style
      Medium

      The name 'BubbleStyle' isn't a class.\n

      DEFAULT_LIST_CONSTRUCTOR

      Code style
      Medium

      The default 'List' constructor isn't available when null safety is enabled.

      EXPECTED_TOKEN

      Code style
      Medium

      Expected to find '['.

      EXTENDS_NON_CLASS

      Code style
      Medium

      Classes can only extend other classes.

      EXTRA_POSITIONAL_ARGUMENTS

      Code style
      Medium

      Too many positional arguments.

      GETTER_NOT_SUBTYPE_SETTER_TYPES

      Code style
      Medium

      Invalid return type

      IMPLEMENTS_NON_CLASS

      Code style
      Medium

      Classes and mixins can only implement other classes and mixins.

      INCLUDE_FILE_NOT_FOUND

      Code style
      Medium

      Include file not found

      INVALID_ASSIGNMENT

      Code style
      Medium

      Invalid assignments

      INVALID_CONSTANT

      Code style
      Medium

      Invalid constant value

      INVALID_OVERRIDE

      Code style
      Medium

      Invalid override

      LIST_ELEMENT_TYPE_NOT_ASSIGNABLE

      Code style
      Medium

      List element type not assignable

      MISSING_DEFAULT_VALUE_FOR_PARAMETER

      Code style
      Medium

      Missing default value for parameter

      MISSING_IDENTIFIER

      Code style
      Medium

      Expected an identifier.

      MISSING_REQUIRED_PARAM

      Code style
      Medium

      Missing required parameters

      MIXIN_OF_NON_CLASS

      Code style
      Medium

      Classes can only mix in mixins and classes.

      MIXIN_WITH_NON_CLASS_SUPERCLASS

      Code style
      Medium

      Mixin can only be applied to class.

      NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT

      Code style
      Medium

      The class doesn't have a default constructor.

      NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER

      Code style
      Medium

      Missing concrete implementations of methods

      NON_BOOL_CONDITION

      Code style
      Medium

      Conditions must have a static type of 'bool'

      NON_CONSTANT_CASE_EXPRESSION

      Code style
      Medium

      Case expressions must be constant

      NON_CONSTANT_DEFAULT_VALUE

      Code style
      Medium

      The default value of an optional parameter must be constant

      NON_CONSTANT_LIST_ELEMENT

      Code style
      Medium

      The values in a const list literal must be constants

      NON_CONSTANT_MAP_VALUE

      Code style
      Medium

      The values in a const map literal must be constant

      NON_TYPE_AS_TYPE_ARGUMENT

      Code style
      Medium

      The name isn't a type so it can't be used as a type argument

      NON_TYPE_IN_CATCH_CLAUSE

      Code style
      Medium

      The name isn't a type and can't be used in an on-catch clause.

      NOT_ASSIGNED_POTENTIALLY_NON_NULLABLE_LOCAL_VARIABLE

      Code style
      Medium

      The non-nullable local variable must be assigned before it can be used.

      NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD

      Code style
      Medium

      Non-nullable instance field must be initialized.

      NOT_INITIALIZED_NON_NULLABLE_VARIABLE

      Code style
      Medium

      The non-nullable variable must be initialized.

      POSITIONAL_AFTER_NAMED_ARGUMENT

      Code style
      Medium

      Positional arguments must occur before named arguments.

      RETURN_OF_INVALID_TYPE

      Code style
      Medium

      Invalid return type

      RETURN_OF_INVALID_TYPE_FROM_CLOSURE

      Code style
      Medium

      Invalid return type from closure

      TYPE_TEST_WITH_UNDEFINED_NAME

      Code style
      Medium

      Undefined name

      UNCHECKED_USE_OF_NULLABLE_VALUE

      Code style
      Medium

      Method can't be unconditionally invoked because the receiver can be 'null'.

      UNDEFINED_CONSTRUCTOR_IN_INITIALIZER

      Code style
      Medium

      Undefined constructor

      UNDEFINED_GETTER

      Code style
      Medium

      Undefined getter

      UNDEFINED_NAMED_PARAMETER

      Code style
      Medium

      Named parameter undefined

      UNDEFINED_SETTER

      Code style
      Medium

      Undefined setter

      UNDEFINED_SUPER_MEMBER

      Code style
      Medium

      Undefined super member

      UNNECESSARY_NON_NULL_ASSERTION

      Code style
      Medium

      Uneccessary non null assertion

      URI_HAS_NOT_BEEN_GENERATED

      Code style
      Medium

      URI has not been generated

      NO_LEADING_UNDERSCORES_FOR_LOCAL_IDENTIFIERS

      Code style
      Medium

      Avoid leading underscores for local identifiers.

      Learn more

      CONSTANT_IDENTIFIER_NAMES

      Code style
      Medium

      Prefer using lowerCamelCase for constant names.