# almost-complete-range

Disallow character ranges stopping before their conventional endpoint

An exclusive range from `a` to `z`, `A` to `Z`, or `0` to `9` omits its conventional endpoint.
Instead, you SHOULD make the endpoint inclusive when the complete sequence is intended.

- Category: suspicious
- Level: warning
- Fix: suggestion
- Scope: module

## Reported

```ds title="main.ds"
const lowercase = 'a'..'z';
```

## Accepted

```ds title="main.ds"
const lowercase = 'a'..='z';
```

## Prior art

- [Clippy · almost_complete_range](https://rust-lang.github.io/rust-clippy/master/index.html#almost_complete_range)

[language/linter/src/rules/suspicious/almost_complete_range.rs:8](https://github.com/destack-sh/destack/blob/main/language/linter/src/rules/suspicious/almost_complete_range.rs#L8)
