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

formatter: add pad_line_comments option #107

Merged
merged 1 commit into from Apr 2, 2023

Conversation

badouralix
Copy link
Contributor

Fixes #104 using braydonk/yaml#16

Add an option to change the number of padding spaces between the yaml content and the first # of a line comment
Keeping 1 as the default value for backward compatibility, although using 2 would make sense as it would be compliant with yamllint default rules

Example of usage :

$ cat comments.yaml
key: "value" # line comment

$ yamlfmt --formatter pad_line_comments=2 comments.yaml

$ cat comments.yaml
key: "value"  # line comment

Also remove unneeded entries from the go sum file

Signed-off-by: Ayaz Badouraly <ayaz.badouraly@datadoghq.com>
Copy link
Collaborator

@braydonk braydonk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :shipit:

@braydonk braydonk merged commit cdca3ce into google:main Apr 2, 2023
4 checks passed
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

Successfully merging this pull request may close these issues.

feat: support multiple spaces before line comments
2 participants