vscode-yaml icon indicating copy to clipboard operation
vscode-yaml copied to clipboard

Azure pipeline expressions causing linter error

Open AndersHogqvist opened this issue 5 months ago • 0 comments

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

  • [x] Windows
  • [ ] Mac
  • [ ] Linux
  • [ ] other (please specify)

AndersHogqvist avatar Sep 18 '24 10:09 AndersHogqvist