dpg validate
dpg validate
Validate .dpg source files offline without diffing
Synopsis
Parse and compile all .dpg source files and run the linter. No database connection or snapshot is required.
Exits 0 when there are no errors. Lint warnings do not cause a non-zero exit unless –strict is set, in which case warnings are promoted to errors.
When one or more .dpg files are given as arguments, only those files are validated (no project discovery required). This mode is used by the LSP server to validate individual files or editor buffers.
Use –format json for machine-readable output.
dpg validate [file...] [flags]
Options
--cluster string cluster to validate (default: all)
--database string database to validate (default: all)
--format string output format: text or json (default "text")
-h, --help help for validate
--strict treat lint warnings as errors (non-zero exit)
Options inherited from parent commands
-C, --dir string project root directory (default: current working directory)
--env string path to .env file (default: .env in project root, if present)
SEE ALSO
- dpg - Declarative PG — schema compiler and migration tool