redhat-developer / redhat-developer/vscode-yaml
Azure pipeline expressions causing linter error
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 829
- Forks
- 260
- Avg merge
- 5h 43m
- Merged PRs (30d)
- 1
Description
Describe the bug
In one of our Azure pipeline files we have the following part:
publishDocs:
- docsArtifact: 'doorstop-html'
docsSubdirectory: ''
${{ if eq(parameters.debugrun, true) }}:
docsName: '$(docsName)-test'
${{ else }}:
docsName: '$(docsName)'
docsDescription: '$(docsDescription)'
${{ if startsWith(variables['Build.SourceBranch'], 'refs/heads/release/') }}:
excludeBuildNumber: true
${{ else }}:
excludeBuildNumber: false
This causes a linter error at the last ${{ else }}: saying that "Map keys must be unique"
Expected Behavior
No linter error
Current Behavior
Azure pipeline expressions seems to be parsed as map keys
Steps to Reproduce
See example in description
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
Start with the Azure pipeline example in the issue and trace the linter diagnostic for the final ${{ else }}: expression. Determine where these expressions are treated as YAML map keys, then add regression coverage for the example and verify that it produces no duplicate-key error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100