# `import.unneeded`

Import of a name the file sees without one.

Area 1, [Project layout and modules](../topics/project-layout-and-modules.md); not declinable; the next step is usually the agent's.

Built-ins, what the file declares, what a test file's subject declares and
the file's own domain are seen without an import:



```jadpo
use shared/types { Stock }

/// A loaf's stock before any choices.
function loaf_stock() -> Stock {
    return 250
}

action stock_item() -> Stock {
    return loaf_stock()
}
```

```jadpo
use menu/actions { loaf_stock }

test "a loaf has 250 in stock" {
    assert loaf_stock() == 250
}
```

```text
error: `loaf_stock` is declared in this test's subject
 --> domains/menu/actions/stock_item.test.jadpo:1:20
  |
1 | use menu/actions { loaf_stock }
  |                    ^^^^^^^^^^ needs no import
  reason: A test file sees everything its subject declares without importing it, and `loaf_stock` is in `stock_item.jadpo`.
  next: Remove this line (agent)
  rule: import.unneeded
  help: https://jadpo.dev/docs/errors/import.unneeded

check failed: 1 error, 4 files
```
