Skip to content

structure/environment-readers

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

Part of the structure configuration, at the all level. It runs at the commit stage, once per scope. gspot runs this check itself.

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

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

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 for some files, with a reason:

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