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
  • GroovyGroovy
  • 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
Groovy

Groovy static code analysis

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

  • All rules 21
  • Bug5
  • Code Smell16
Filtered: 2 rules found
naming
    Impact
      Clean code attribute
        1. Method names should not use reserved keywords

           Code Smell
        2. Method names should follow camelCase naming conventions

           Code Smell

        Method names should follow camelCase naming conventions

        consistency - conventional
        maintainability
        Code Smell
        • naming

        This rule raises an issue when a method name does not follow camelCase conventions, such as starting with an uppercase letter or using underscores.

        Why is this an issue?

        How can I fix it?

        More Info

        Consistent method naming conventions are essential for code readability and maintainability. The camelCase convention, where method names start with a lowercase letter followed by mixed case letters and numbers, is widely adopted in many programming languages including Groovy.

        When method names don’t follow this convention, several problems arise:

        • Reduced readability: Inconsistent naming makes code harder to scan and understand quickly
        • Team confusion: Different naming styles within the same codebase create cognitive overhead for developers

        Method names that start with uppercase letters can be particularly confusing because they resemble class names, potentially misleading developers about the code’s structure. Similarly, underscore-separated names (snake_case) are more common in other languages and can make Groovy code feel inconsistent with language conventions.

        What is the potential impact?

        While this issue doesn’t directly affect application functionality, it impacts code maintainability and team productivity. Inconsistent naming conventions make code reviews more difficult, reduce code readability, and can slow down development as team members need extra time to understand non-standard naming patterns.

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

        © 2026 SonarSource Sàrl. All rights reserved.

        Privacy Policy | Cookie Policy | Terms of Use