Skip to content

Apply automatic formatting only to manifests#1506

Merged
jsoriano merged 4 commits intoelastic:mainfrom
jsoriano:smarter-yaml-formatter
Oct 17, 2023
Merged

Apply automatic formatting only to manifests#1506
jsoriano merged 4 commits intoelastic:mainfrom
jsoriano:smarter-yaml-formatter

Conversation

@jsoriano
Copy link
Copy Markdown
Member

Modifies automation introduced in #1485 so it is only applied to manifests by now.

Applying it to other files like transforms or test configuration files may lead to obscure errors.

@jsoriano jsoriano requested a review from a team October 16, 2023 16:19
@jsoriano jsoriano self-assigned this Oct 16, 2023
node.Content = node.Content[:k]
}

func quoteKeysWithDot(node *yaml.Node) {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Started applying this to test files, but this could also have unexpected results.

This is not used now, if we finally decide not to use it I will remove it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not very confident to apply this transformation. Maybe just in transform.yml files ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah, after some tests I think this one can be a bit misleading, I am more leaned to remove it, and apply only the automation for nested objects in manifests.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Removed

node.Content = node.Content[:k]
}

func quoteKeysWithDot(node *yaml.Node) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not very confident to apply this transformation. Maybe just in transform.yml files ?

@elasticmachine
Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

History

cc @jsoriano

@jsoriano jsoriano merged commit 97303ff into elastic:main Oct 17, 2023
@jsoriano jsoriano deleted the smarter-yaml-formatter branch October 17, 2023 13:48
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.

3 participants