---
title: Use lowerCamelCase for non-constant identifiers
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Datadog Security > Code Security > Static Code Analysis (SAST) > SAST
  Rules > Use lowerCamelCase for non-constant identifiers
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Use lowerCamelCase for non-constant identifiers

{% 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:** `dart-code-quality/non-constant-identifier-names`

**Language:** Dart

**Severity:** Notice

**Category:** Code Style

## Description{% #description %}

Non-constant identifiers (variables, functions, parameters, getters, and setters) must use lowerCamelCase in Dart. Using underscores or mixed conventions reduces readability and breaks tooling expectations. Rename the identifier so the first word is lowercase and each subsequent word starts with a capital letter.

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

```dart
void my_function(int My_Param) {
  var My_Variable = 42;
  final AnotherVar = 'hello';
}

class MyClass {
  int my_field = 0;

  String get MyGetter => '';
}
```

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

```dart
const double pi = 3.14159;
const String APP_NAME = 'MyApp';
const int MY_CONSTANT = 42;

void myFunction(int myParam, String _unused) {
  var myVariable = 42;
  final anotherVar = 'hello';
  String _privateVar = '';
}

class MyClass {
  int myField = 0;

  String get myGetter => '';
  set mySetter(String v) {}
}
```
  Seamless integrations. Try Datadog Code SecurityDatadog Code Security 
{% icon name="icon-external-link" /%}
 