Add --type={repo,vendor} to README and configuration test (#1496)
Follow-up to https://github.com/bazel-contrib/buildtools/pull/1485.
## Buildtools PR checklist
- [x] The code in this PR is covered by unit/integration tests.
- [x] I have tested these changes and provide testing instructions
below.
- [x] I have either responded to, or resolved all Gemini comments on the
PR.
- [x] I have read Google Eng Practices on [Small
Changes](https://google.github.io/eng-practices/review/developer/small-cls.html),
this PR either follows these guidelines or the description provides
reasoning for why they can not be followed.diff --git a/buildifier/README.md b/buildifier/README.md
index faef977..82ff565 100644
--- a/buildifier/README.md
+++ b/buildifier/README.md
@@ -55,6 +55,8 @@
cat foo.bar | buildifier --type=workspace
cat foo.bar | buildifier --type=default
cat foo.bar | buildifier --type=module
+cat foo.bar | buildifier --type=repo
+cat foo.bar | buildifier --type=vendor
```
## Linter
diff --git a/buildifier/config/config_test.go b/buildifier/config/config_test.go
index ca31dd6..9b5264d 100644
--- a/buildifier/config/config_test.go
+++ b/buildifier/config/config_test.go
@@ -265,6 +265,8 @@
"type workspace": {options: "--type=workspace"},
"type default": {options: "--type=default"},
"type module": {options: "--type=module"},
+ "type repo": {options: "--type=repo"},
+ "type vendor": {options: "--type=vendor"},
"type auto": {options: "--type=auto"},
"type error": {options: "--type=foo", wantErr: fmt.Errorf("unrecognized input type foo; valid types are build, bzl, workspace, default, module, repo, vendor, auto")},
"warnings all": {options: "--warnings=all", wantWarnings: []string{