Allow configuration parameters to be passed as command-line parameters
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 523
- Forks
- 75
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 24
Description
Summary of the new feature / enhancement
Allow parameters to dsc after -- to be interpreted as parameters to the configuration.
Proposed technical implementation details (optional)
Assume a configuration that looks like:
parameters:
osFamily:
type: string
defaultValue: Windows
allowedValues:
- Windows
- Linux
- macOS
name:
type: string
Then we could allow config parameters to be passed as command-line parameters after --, so something like:
dsc config get -p ./foo.dsc.yaml -- --osFamily Windows --name test
One limitation to this experience is that JSON is case-sensitive, so the parameter names would have to be case-sensitive. We could allow for case-insensitive and do an exact match first and then case-insensitive match if it only matches one (it would be a bad practice to have multiple parameters that differ by case, although it would be allowed). However, parameter values are also case-sensitive, so we'd also need to perform a best match if there's an allowedValues.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by tracing argument handling for dsc config get, then follow how configuration parameters and allowedValues are resolved. Done means arguments after -- are passed to the configuration with the documented matching and case-sensitivity behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100