pascalre / vscode-yaml-sort

This VS Code extension exposes the possibility to sort, format and validate yaml files.
https://marketplace.visualstudio.com/items?itemName=PascalReitermann93.vscode-yaml-sort
MIT License
41 stars 2 forks source link

Problems with Formatting Azure DevOps Yaml File with template and parameters #205

Open pri-kise opened 2 months ago

pri-kise commented 2 months ago

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
}