---
title: "U0003: Inconsistent indentation"
url: https://una-lang.org/en/docs/errors/U0003/
release: v0.4.0
source: https://github.com/una-lang/una/blob/v0.4.0/crates/una-explain/explain/U0003.md
---

# U0003: Inconsistent indentation

Each indentation level is exactly two spaces deeper than the enclosing one, and a line that closes blocks must return to the indentation of an enclosing level (`spec/01 §2`). U0003 reports a line indented by an odd number of spaces relative to its block, a line more than one level deeper than the line before it, and a line dedented to a column that no enclosing block uses. The diagnostic proposes mechanical edits that re-indent the line to the nearest valid levels.

## The repair at a glance

```diff
  module demo

  pub double(x: Int) -> Int
    requires x >= 0
  =
-    x * 2
+   x * 2
```

## Failing example

```una
module demo

pub double(x: Int) -> Int
  requires x >= 0
=
   x * 2
```

## Fixed example

```una
module demo

pub double(x: Int) -> Int
  requires x >= 0
=
  x * 2
```
