Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure pipeline expressions causing linter error #1056

Open
1 of 4 tasks
AndersHogqvist opened this issue Sep 18, 2024 · 1 comment
Open
1 of 4 tasks

Azure pipeline expressions causing linter error #1056

AndersHogqvist opened this issue Sep 18, 2024 · 1 comment

Comments

@AndersHogqvist
Copy link

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)
@kenhia
Copy link

kenhia commented Dec 19, 2024

This also occurs when using multiple ${{ inserts }} and other items that are preprocessed like:

parameters:
  # pass along parameters
  ${{ insert }}: ${{ parameters }}
  ${{ insert }}: ${{ cfg }}  # <-- Map keys must be unique error here

It would be awesome to have a setting for regex's for the linter to ignore.

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

No branches or pull requests

2 participants