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

build(deps): bump github.com/google/yamlfmt from 0.10.0 to 0.11.0 in /tools/mod #17519

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 4, 2024

Bumps github.com/google/yamlfmt from 0.10.0 to 0.11.0.

Release notes

Sourced from github.com/google/yamlfmt's releases.

v0.11.0

Oops, all features!

https://www.youtube.com/watch?v=cXBX2PumuBk

It's been a while since the last release! Life has kept me very busy, but since there were a number of feature requests in the issue queue that weren't too challenging to implement I knocked a bunch of them off the list! I also came up with one feature for this release myself.

Config Discovery Enhancements

Two major enhancements to config discovery! I am pretty sure they are purely additive and shouldn't break any existing workflows, but don't hesitate to open an issue if there's something I missed.

Config file can be .yamlfmt, yamlfmt.yaml, or yamlfmt.yml

Instead of forcing the .yamlfmt hidden file name, the command will also recognize yamlfmt.yaml or yamlfmt.yml as a valid file name. (Note that this only applies to automatic config searching; it has never mattered what the name of a file specified directly in the -conf flag is.)

Config file search goes all the way up the directory tree

Instead of only looking for a yamlfmt config in the working directory, it will look at every directory up from the current directory and use the nearest config file it can find. If it doesn't find one all the way up the tree, then it will default to the config file in the global location at $XDG_CONFIG_HOME/yamlfmt (LOCALAPPDATA on Windows). This should be useful for monorepo scenarios, where you might want to apply a single yamlfmt config file to a number of projects within the monorepo, instead of needing a config file in every sub-project or having to manually specify with -conf.

This does change some potential scenarios where previously the global config would have been discovered. To combat this, I added a new command line flag -global_conf that will force using the config from the global location.
Similarly, I added -no_global_conf to force not using the global config.

Use a .gitignore for excludes

The -gitignore_excludes or gitignore_excludes top-level config option will allow yamlfmt to use patterns from a .gitignore file for excluding files from formatting! This should be helpful for scenarios where you previously would have needed to repeat all of these patterns in your own yamlfmt excludes config. You can also specify a specific path to a .gitignore file with -gitignore_path or gitignore_path (command/config respectively).

Retain only single line breaks

Sometimes you have yaml files where there are lots of line breaks in a row. Sometimes you want to keep those, but sometimes you only want to keep a single one out of a group. The new formatter-level config option retain_line_breaks_single will make it so this:

a: 1
b: 2

Formats to this:

a: 1
b: 2

Debug Logging

(This is the one I came up with)

By default yamlfmt is deliberately very quiet on output. This did have a negative though, as even in verbose mode it was hard to figure out which config file was used, or why files may have been excluded/included in formatting. Introducing the -debug command line flag! Currently there are two debug logging profiles:

  • The config profile will log the config file discovery process so you can figure out which config file was used and why
  • The paths profile will log the include/exclude process to understand exactly which paths are included/excluded and why

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [github.com/google/yamlfmt](https://github.com/google/yamlfmt) from 0.10.0 to 0.11.0.
- [Release notes](https://github.com/google/yamlfmt/releases)
- [Changelog](https://github.com/google/yamlfmt/blob/main/.goreleaser.yaml)
- [Commits](google/yamlfmt@v0.10.0...v0.11.0)

---
updated-dependencies:
- dependency-name: github.com/google/yamlfmt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Mar 4, 2024
@k8s-ci-robot
Copy link

Hi @dependabot[bot]. Thanks for your PR.

I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Contributor Author

dependabot bot commented on behalf of github Mar 7, 2024

Looks like github.com/google/yamlfmt is up-to-date now, so this is no longer needed.

@dependabot dependabot bot closed this Mar 7, 2024
@dependabot dependabot bot deleted the dependabot/go_modules/tools/mod/github.com/google/yamlfmt-0.11.0 branch March 7, 2024 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file go Pull requests that update Go code needs-ok-to-test
Development

Successfully merging this pull request may close these issues.

1 participant