Configuration File
envcheck uses a YAML configuration file to define environment validation rules. The configuration file specifies which tools, environment variables, ports, files, and network endpoints should be checked.File Location
envcheck automatically searches for configuration files in the following order:.envcheck.yaml.envcheck.ymlenvcheck.yamlenvcheck.yml
Configuration Structure
A configuration file consists of a requiredversion field and optional validator sections:
Version Field
string
required
The configuration file format version. Currently, only
"1" is supported.Validator Sections
All validator sections are optional and default to empty arrays if not specified:array
default:"[]"
Tool validation checks. See Tool Validation for details.
array
default:"[]"
Environment variable checks. See Environment Variables for details.
array
default:"[]"
Port availability checks. See Port Checks for details.
array
default:"[]"
File and directory validation. See File Validation for details.
array
default:"[]"
Network connectivity checks. See Network Checks for details.
Complete Example
Here’s a complete configuration file for a Node.js project:Loading Configuration
The configuration file is loaded from src/config.rs:66 using theConfig::load() method, which reads and parses the YAML file. The Config::find_config() method (src/config.rs:76) automatically searches for configuration files in the standard locations.