# structure/environment-readers

> Finds environment reads outside the files listed in structure.environment_readers.

Finds environment reads outside the files listed in structure.environment\_readers.

Part of the [`structure`](/reference/configurations/structure/) configuration, at the `all` [level](/start/concepts/#levels). It runs at the `commit` [stage](/start/concepts/#stage), once per scope. gspot runs this check itself.

## Why

Environment reads spread through the code hide which settings a program needs.

## What to do

Move the environment read into a file listed in structure.environment\_readers, then pass the value to callers.

## Example

A Python file that uses `os.environ` outside `structure.environment_readers` reports a finding. Move that access into an environment reader, and pass the value to callers.

## Turn it off

Turn it off for some files, with a reason:

```shell
gspot ignore structure/environment-readers --paths "<glob>" --reason "<why>"
```
