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.

      ANNOTATE_OVERRIDES

      Best practice
      Medium

      Annotate overridden members.

      Learn more

      LEADING_NEWLINES_IN_MULTILINE_STRINGS

      Best practice
      Medium

      Start multiline strings with a newline.

      UNNECESSARY_TYPE_CHECK

      Best practice
      Medium

      Unnecessary type check

      BODY_MIGHT_COMPLETE_NORMALLY_NULLABLE

      Best practice
      Medium

      The analyzer produces this diagnostic when a method or function can implicitly return null by falling off the end. While this is valid Dart code, it’s better for the return of null to be explicit.

      UNNECESSARY_QUESTION_MARK

      Best practice
      Medium

      The ‘?’ is unnecessary because the value is nullable without it.

      PREFER_FINAL_FIELDS

      Best practice
      Medium

      Field could be final.

      PREFER_GENERIC_FUNCTION_TYPE_ALIASES

      Best practice
      Medium

      Prefer generic function type aliases.

      AVOID_IMPLEMENTING_VALUE_TYPES

      Best practice
      Medium

      Don't implement classes that override `==`.

      UNNECESSARY_OVERRIDES

      Best practice
      Medium

      Don't override a method to do a super method invocation with the same parameters.

      DUPLICATE_PART

      Best practice
      Medium

      The library already contains a part.

      INVALID_LANGUAGE_VERSION_OVERRIDE

      Best practice
      Medium

      The language version override must be specified before any declaration or directive.