---
title: Avoid very short function names
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Datadog Security > Code Security > Static Code Analysis (SAST) > SAST
  Rules > Avoid very short function names
---

# Avoid very short function names

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com, us2.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ({% placeholder "user-datadog-site-name" /%}).
{% /alert %}

{% /callout %}

## Metadata{% #metadata %}

**ID:** `rust-code-quality/function-name-min-length`

**Language:** Rust

**Severity:** Info

**Category:** Best Practices

## Description{% #description %}

Function names should be descriptive of their behavior. Instead of using a very short name, always use a name that indicates what the function does.

## Arguments{% #arguments %}

- `min-length`: Minimum length for function names. Default: 2.

## Non-Compliant Code Examples{% #non-compliant-code-examples %}

```rust
fn a() {
    println!("Hello world!");
}
```

## Compliant Code Examples{% #compliant-code-examples %}

```rust
fn hello() {
    println!("Hello world!");
}
```
  Seamless integrations. Try Datadog Code SecurityDatadog Code Security 
{% icon name="icon-external-link" /%}
 