Skip to content

feat(cli): add --config option to generate - #35

Merged
omer-cengel merged 2 commits into
masterfrom
feature/generate-config-path
Sep 25, 2026
Merged

omer-cengel merged 2 commits into
masterfrom
feature/generate-config-path

Conversation

@omer-cengel

Copy link
Copy Markdown
Member

Summary

sqlcj generate can now load a configuration file named by --config <path>, so generation can run from any working directory. Without the option, sqlcj.yaml in the working directory remains the default and behavior is unchanged.

Changes

  • Add --config <path> to generate, defaulting to sqlcj.yaml. A relative value is resolved against the working directory; relative schema, queries, and java.out paths inside the file still resolve against the file's own directory.
  • A missing or invalid explicit file reports the existing one-line sqlcj: configuration diagnostic and exits with status 1, with no fallback to sqlcj.yaml.
  • Add CLI subprocess tests that generate from a sibling directory without writing to it, and that reject a missing explicit file without generating output.
  • Document the option, its default, and path resolution in the README, configuration reference, and quickstart.

Scope and non-goals

  • No short option alias, environment variable, or parent-directory configuration discovery.
  • Configuration path resolution inside the file, exit codes, and diagnostic wording are unchanged.

@omer-cengel
omer-cengel merged commit f4fdd54 into master Sep 25, 2026
6 checks passed
@omer-cengel
omer-cengel deleted the feature/generate-config-path branch September 25, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant