redhat-developer / redhat-developer/vscode-yaml
We use variables in YAML which gets filled afterwards can't use the variables with customTags
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 829
- Forks
- 260
- Avg merge
- 5h 43m
- Merged PRs (30d)
- 1
Description
Describe the bug
We use Java to build our project (maven) and variables will be put in the YAML file like:
services:
${project.artifactId}:
image: ${project.artifactId}:dev
so the actual file will be genereated in src/target folder with the appropiate name.
I can't save these docker-compose file cause the formatter makes it
services:
"${project.artifactId}":
image: ${project.artifactId}:dev
not to mention also putting the JAVA_OPTS from multi-line
JAVA_TOOL_OPTIONS: "
-Dencryption.keystore.type=JCEKS
-Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding
-Dencryption.keyAlgorithm=DESede
"
Back to 1-line
JAVA_TOOL_OPTIONS: " -Dencryption.keystore.type=JCEKS -Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding -Dencryption.keyAlgorithm=DESede"
Expected Behavior
When adding the variable to the settings.json
"yaml.customTags": [
"${project.artifactId}"
],
It should encapsulet them in quotes
Current Behavior
see problem
Steps to Reproduce
- use the example piece of yaml
- hit save
- see the change
Environment
- Windows
- Mac
- Linux
- other (please specify)
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
Reproduce the formatter behavior with the YAML examples and the yaml.customTags setting described in the issue. Start by tracing the customTags handling in the formatter, then verify that variable-like keys remain valid and the shown multiline JAVA_TOOL_OPTIONS value is preserved as intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode, yaml
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100