Skip to content

Files

Latest commit

 

History

History
19 lines (12 loc) · 477 Bytes

do_not_use_environment.md

File metadata and controls

19 lines (12 loc) · 477 Bytes

Pattern: Use of environment constructor

Issue: -

Description

Using values derived from the environment at compile-time, creates hidden global state and makes applications hard to understand and maintain.

Example of incorrect code:

const loggingLevel =
 bool.hasEnvironment('logging') ? String.fromEnvironment('logging') : null;

Further Reading