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
Rust

Rust static code analysis

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

  • All rules 85
  • Bug60
  • Code Smell25

  • Quick Fix 4
Filtered: 4 rules found
pitfall
    Impact
      Clean code attribute
        1. Getters should access the expected fields

           Bug
        2. Invisible Unicode characters should not be used

           Code Smell
        3. Wildcard imports should not be used

           Code Smell
        4. Related "if/else if" statements should not have the same condition

           Bug

        Wildcard imports should not be used

        intentionality - clear
        maintainability
        Code Smell
        • pitfall
        • clippy

        Why is this an issue?

        How can I fix it?

        More Info

        Importing every public name from a module using a wildcard (use _::*) is a bad idea because:

        • It could lead to conflicts between names defined locally and the ones imported.
        • It reduces code readability as developers will have a hard time knowing where names come from.
        • It clutters the local namespace, which makes debugging more difficult.

        Remember that imported names can change when you update your dependencies. A wildcard import that works today might be broken tomorrow.

        Exceptions

        No issue will be raised for modules that their name contains prelude . Many crates, including the standard library, provide modules named prelude that are specifically designed for wildcard import.

        No issue will be raised in test modules. This is defined as any module with test in the name.

          Available In:
        • SonarQube CloudDetect issues in your GitHub, Azure DevOps Services, Bitbucket Cloud, GitLab repositories

        © 2008-2025 SonarSource SA. All rights reserved.

        Privacy Policy | Cookie Policy | Terms of Use