You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: This discussion was converted from issue #481. For the v1 core, we are keeping our API surface laser-focused on runtime validation (arkenv check) rather than building custom AST parsers for file formatting. Leaving this architectural specification here for future consideration or if the community wants to explore a standalone CLI linter or tool.
Summary
arkenv lint was conceived as a dev-time linter for .env* files on disk. It is complementary to arkenv check, not a second name for the same command.
check (#962, shipped in #1632): would this process boot? Subject is the resolved environment (process.env plus optional --env-file overlays) vs the schema. Key-level findings. CI / hooks.
lint (this RFC): are these dotenv files well-authored? Subject is files on disk: syntax, duplicates, unquoted spaces, git-tracked secrets, example placeholders, and schema issues pinned to file:line:col. Editor problem matchers and pre-commit on .env*.
sync (#1234): writes files from the schema. Third sibling, same schema loader.
lint was designed to reusecheck’s schema loader and validate() — not fork a second validation path. It would grow the dotenv parser so a parse yields both an env record and a coordinate map, run static rules that only make sense on files, then remap EnvIssue[] onto those coordinates.
Desired Behavior Spec
Command
arkenv lint [--schema <path>] [--env <name>]
Parser & Coordinate Mapping
Coordinate-aware line scanner: each defined key maps to file, line, and col. Malformed lines are diagnostics, not silent skips.
Lint Rules
Rule 1 (Schema validation): values vs the imported schema (types, missing keys, bounds, patterns), mapped to coordinates.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Summary
arkenv lintwas conceived as a dev-time linter for.env*files on disk. It is complementary toarkenv check, not a second name for the same command.check(#962, shipped in #1632): would this process boot? Subject is the resolved environment (process.envplus optional--env-fileoverlays) vs the schema. Key-level findings. CI / hooks.lint(this RFC): are these dotenv files well-authored? Subject is files on disk: syntax, duplicates, unquoted spaces, git-tracked secrets, example placeholders, and schema issues pinned tofile:line:col. Editor problem matchers and pre-commit on.env*.sync(#1234): writes files from the schema. Third sibling, same schema loader.Architecture Blueprint
One pipeline, two subjects:
lintwas designed to reusecheck’s schema loader andvalidate()— not fork a second validation path. It would grow the dotenv parser so a parse yields both an env record and a coordinate map, run static rules that only make sense on files, then remapEnvIssue[]onto those coordinates.Desired Behavior Spec
Command
Parser & Coordinate Mapping
Coordinate-aware line scanner: each defined key maps to
file,line, andcol. Malformed lines are diagnostics, not silent skips.Lint Rules
=)..envfiles are tracked instead of ignored..env.examplemust not contain real secrets.Output & Exit Codes
path/to/file.env:line:col: message--json/--agent: settlement envelope; diagnostics includewhere: { path, line, column }pointing at dotenv filesAll reactions