Repository navigation
Conversation
There was a problem hiding this comment.
this is a fix to the config_validation to prevent it borking on yaml parser errors
4685a58 to
db26866
Compare
There was a problem hiding this comment.
not sure if this is part of this files badness - but i think it would just be ignore when the yaml was parsed
d10fafe to
06b8f86
Compare
|
further information regarding this PR working with a principle of least indent:
when i started working with Envoy config i quickly became a convert to not indenting lists as it makes the config much more readable and concise Envoy config has the complexity of a programming language with inline imports so i think its really important to have a standard way of writing - imho this is way more readable currently in the docs there are a mixture of styles often in the same files and this makes it much harder to read/copy/fix etc there is not currently an autofix - but i can look at that as part of #15777 i will also document when updating the style guide #15507 there are some other cleanups to make the linter happy (i think for good reason):
this does disambiguate the purpose of these i think, so its probs a better way - we might want too not use dict defs in some cases |
There was a problem hiding this comment.
not sure the yamllint config setting is necessary here - its changing to the directory - ie envoy roo
mattklein123
left a comment
There was a problem hiding this comment.
Thanks this is fantastic. It would be really nice to somehow do this also for doc YAML snippets, but that probably isn't easily possible. One small comment about pre push checking. Thank you!
/wait
There was a problem hiding this comment.
I meant to suggest this on the previous PR around whitespace, but before we do more here, can we consolidate as many checks here with https://github.com/envoyproxy/envoy/blob/main/support/hooks/pre-push? Many devs run that pre push script which catches issues before it gets to CI. Can we do YAML linting, glint, etc. on a per-file basis in that script also? I'm not sure we can do all checks, but I think we can do most of them and it saves people a huge amount of time. This is also why it's important to have "fix" targets to also not annoy people and auto fix where possible.
There was a problem hiding this comment.
re autofix - unless we dont use the definition dicts then its not so easy to autofix yaml - when its parsed there is no way to discriminate whether its indented code, or a dictionary - so it would change lots of files, and enforce a style we might not want
yep agreed re hooks, but it needs in that case to work on diffs, which is doable but more complex
these scripts are very resource consuming
ill look now at adding
i also want to flag the large amount of yaml changes, which i think is important
Ive done it mostly by hand, checking etc, so i think its good - but, more eyes, etc..
There was a problem hiding this comment.
Yeah I will go through all the files later, but let's go ahead and try to make things work on the pre-push hook in the interim.
There was a problem hiding this comment.
cool - i think it would make sense to do this separately to the bazel job - i think i can do it with git + yamllint - it probs doesnt make sense to add git as a py dependency right now i think - and i guess it can skip/warn yamllint if its not installed
There was a problem hiding this comment.
there might be an autofix - ill investigate further - adrienverge/yamllint#62 (comment)
all the envoy docs will be updated with this - did you mean a diffferent doc YAML ? |
d984689 to
f39eae1
Compare
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
Signed-off-by: Ryan Northey <[email protected]>
|
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
Signed-off-by: Ryan Northey [email protected]
Commit Message: yaml: Lint yaml files
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]
[Optional API Considerations:]