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

Problems with Formatting Azure DevOps Yaml File with template and parameters

Open pri-kise opened this issue 1 year ago • 0 comments

Hi I want to use the extension with Azure DevOps Pipelines and want to use templates.

This is the result after formatting:

name: $(Build.BuildId)

variables:
  - group: Custom Settings

trigger: none

stages:
  - parameters:
      firstparamter: XXX
      secondparameter: YYY
    template: templates\CI.yml

This is the expected result: I'd like to have the template line before the parameters line.

name: $(Build.BuildId)

variables:
  - group: 'Custom Settings'

trigger: none

stages:
  - template: templates\CI.yml
    parameters:
      firstparamter: 'XXX'
      secondparameter: 'YYY'

my settings for the extension:

{
    "vscode-yaml-sort.customSortKeywords_2": [
        "name",
        "variables",
        "trigger",
        "resources"
    ],
    "vscode-yaml-sort.emptyLinesUntilLevel": 1,
    "vscode-yaml-sort.useLeadingDashes": false
}

pri-kise avatar Apr 23 '24 07:04 pri-kise