-
Notifications
You must be signed in to change notification settings - Fork 255
Open
Labels
Description
Describe the bug
yamllint, a linter used by many projects and companies, has a different requirement on the number of spaces before comments than what the YAML formatter in this plugin provides:
What yamllint requires is two spaces before the comment #:
timeout: 1800 # value in seconds ~ 30m
Formatting of this plugin results in a single space:
timeout: 1800 # value in seconds ~ 30m
Thus, YAML files saved (with Format on Save activated) with VS Code and this plugin enabled results in YAML files that are rejected by systems using yamllint to check for compliance (e.g. CI systems).
Expected Behavior
Files are formatted according to the yamllint requirements, e.g. double space before comments.
OR
Option to specify formatting requirements is given.
Current Behavior
Files are not formatted according to yamllint requirements, e.g. single space before comments.
Steps to Reproduce
- Create file
test.yamlwith contents:
- job:
name: some-job
timeout: 1800 # value in seconds ~ 30m
- Run
yamllint test.yaml--> pass - Apply formatting in VS Code which will reduce double-space to single-space
- Run
yamllint test.yaml--> fail
Environment
- Windows
- Mac
- Linux
- other (please specify)
Reactions are currently unavailable