Sha256: b6b7743a9973777429bf1a017e06b7acf5fe7e710237b313ba1e8391d151a207

Contents?: true

Size: 1.05 KB

Versions: 17

Compression:

Stored size: 1.05 KB

Contents

# Uncommunicative Variable Name

## Introduction

An `Uncommunicative Variable Name` is a variable name that doesn't communicate its intent well enough.

Poor names make it hard for the reader to build a mental picture of what's going on in the code. They can also be mis-interpreted; and they hurt the flow of reading, because the reader must slow down to interpret the names.

## Current Support in Reek

`Uncommunicative Variable Name` checks for:

* 1-character names
* any name ending with a number
* camelCaseVariableNames

## Configuration

Reek's `Uncommunicative Variable Name` detector supports the [Basic Smell Options](Basic-Smell-Options.md), plus:

| Option         | Value       | Effect  |
| ---------------|-------------|---------|
| `reject` | array of regular expressions | The set of regular expressions that Reek uses to check for bad names. Defaults to `[/^.$/, /[0-9]$/, /[A-Z]/]`. |
| `accept` | array of strings or regular expressions | Name that will be accepted (not reported) even if they match one of the `reject` expressions. Defaults to @['_']@.|

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
reek-4.0.1 docs/Uncommunicative-Variable-Name.md
reek-4.0.0 docs/Uncommunicative-Variable-Name.md
reek-4.0.0.pre1 docs/Uncommunicative-Variable-Name.md
reek-3.11 docs/Uncommunicative-Variable-Name.md
reek-3.10.2 docs/Uncommunicative-Variable-Name.md
reek-3.10.1 docs/Uncommunicative-Variable-Name.md
reek-3.10.0 docs/Uncommunicative-Variable-Name.md
reek-3.9.1 docs/Uncommunicative-Variable-Name.md
reek-3.9.0 docs/Uncommunicative-Variable-Name.md
reek-3.8.3 docs/Uncommunicative-Variable-Name.md
reek-3.8.2 docs/Uncommunicative-Variable-Name.md
reek-3.8.1 docs/Uncommunicative-Variable-Name.md
reek-3.8.0 docs/Uncommunicative-Variable-Name.md
reek-3.7.1 docs/Uncommunicative-Variable-Name.md
reek-3.7.0 docs/Uncommunicative-Variable-Name.md
reek-3.6.1 docs/Uncommunicative-Variable-Name.md
reek-3.6.0 docs/Uncommunicative-Variable-Name.md