google / google/yamlfmt

Spaces before comments

Open
#208 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
1.8k
Forks
75
PR merge metrics
No merged PRs in 30d

Description

Hello,

yamllint 1.35.1 output
![image](https://github.com/user-attachments/assets/b145758a-eb2a-4aee-b2da-ed4e72ef841b)

yamlfmt 0.13.0 doesn't add the required spaces asked by yamllint

.yamlfmt file
```
formatter:
type: basic
include_document_start: true
pad_line_comments: 2
```

It happens when there's a comment in a like starting by the dash character like this :

```
...
rules:
- # Ingress host
host: "xxxx.xxx.xxx"
# Paths for the host
paths:
- path: /auth/admin/
pathType: Prefix
# Console TLS configuration
tls:
```

Am I missing something please ?

Thank you.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.