SonarSource Rules
  • Products

    In-IDE

    Code Quality and Security in your IDE with SonarQube Ide

    IDE extension that lets you fix coding issues before they exist!

    Discover SonarQube for IDE

    SaaS

    Code Quality and Security in the cloud with SonarQube Cloud

    Setup is effortless and analysis is automatic for most languages

    Discover SonarQube Cloud

    Self-Hosted

    Code Quality and Security Self-Hosted with SonarQube Server

    Fast, accurate analysis; enterprise scalability

    Discover SonarQube Server
  • SecretsSecrets
  • ABAPABAP
  • AnsibleAnsible
  • ApexApex
  • AzureResourceManagerAzureResourceManager
  • CC
  • C#C#
  • C++C++
  • CloudFormationCloudFormation
  • COBOLCOBOL
  • CSSCSS
  • DartDart
  • DockerDocker
  • FlexFlex
  • GitHub ActionsGitHub Actions
  • GoGo
  • HTMLHTML
  • JavaJava
  • JavaScriptJavaScript
  • JSONJSON
  • JCLJCL
  • KotlinKotlin
  • KubernetesKubernetes
  • Objective CObjective C
  • PHPPHP
  • PL/IPL/I
  • PL/SQLPL/SQL
  • PythonPython
  • RPGRPG
  • RubyRuby
  • RustRust
  • ScalaScala
  • ShellShell
  • SwiftSwift
  • TerraformTerraform
  • TextText
  • TypeScriptTypeScript
  • T-SQLT-SQL
  • VB.NETVB.NET
  • VB6VB6
  • XMLXML
  • YAMLYAML
Dart

Dart static code analysis

Unique rules to find Bugs, Vulnerabilities, Security Hotspots, and Code Smells in your DART code

  • All rules 126
  • Vulnerability4
  • Bug15
  • Security Hotspot8
  • Code Smell99
 
Tags
    Impact
      Clean code attribute
        1. "mounted" should be checked before using a "BuildContext " after an async operation

           Bug
        2. "void" variables should not be assigned a value

           Bug
        3. Constant patterns should not be used with type literals

           Bug
        4. "is!" should be used instead of "!is"

           Bug
        5. Getters should not be recursive

           Bug
        6. Nullable type parameter values should not be null checked with `!`

           Bug
        7. Regular expressions should be syntactically valid

           Bug
        8. Color definitions should be valid

           Bug
        9. "const" modifier should not be redundant

           Bug
        10. Setters should not declare return types

           Bug
        11. Inappropriate collection calls should not be made

           Bug
        12. Unnecessary equality checks should not be made

           Bug
        13. The original exception object should be rethrown

           Bug
        14. "==" operator and "hashCode()" should be overridden in pairs

           Bug
        15. Jump statements should not occur in "finally" blocks

           Bug

        Getters should not be recursive

        intentionality - logical
        reliability
        Bug

          Getters that recursively call themselves are likely a bug and should be changed, to not be recursive.

          Why is this an issue?

          How can I fix it?

          More Info

          Unlike a method or a function, a getter doesn’t receive any input parameter. As a consequence, when invoked, it has no way to break the recursion, based on its input. Therefore, if a getter calls itself, it will most likely cause an infinite loop, resulting into a stack overflow.

          This rule detects direct recursion invocations in the context of instance and static getters of classes, mixins, extensions, and extension types.

            Available In:
          • SonarQube CloudDetect issues in your GitHub, Azure DevOps Services, Bitbucket Cloud, GitLab repositories
          • SonarQube ServerAnalyze code in your
            on-premise CI
            Developer Edition
            Available Since
            10.7

          © 2008-2025 SonarSource SA. All rights reserved.

          Privacy Policy | Cookie Policy | Terms of Use