-
Notifications
You must be signed in to change notification settings - Fork 43
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
feat: add flag to print resolved config #179
Merged
braydonk
merged 5 commits into
google:main
from
kachick:feat-mode-output-resolved-config
May 13, 2024
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
dfad477
feat: add flag to print resolved config
kachick 2d4315e
chore: apply suggestions
kachick abb3850
fix: commit .yamlfmt in integrationtest
kachick 1098de3
chore: remove unused fixtures in print_conf tests
kachick 98b7d94
fix: add keep file to make sure empty directory in integration tests
kachick File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# Sometimes use these for testing | ||
.yamlfmt | ||
!integrationtest/**/.yamlfmt | ||
tmp | ||
|
||
# Goreleaser build folder | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ const ( | |
OperationLint | ||
OperationDry | ||
OperationStdin | ||
OperationPrintConfig | ||
) | ||
|
||
type Engine interface { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
integrationtest/command/testdata/print_conf_file/after/.yamlfmt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
continue_on_error: false | ||
doublestar: true | ||
exclude: | ||
- "**/templates/*.yaml" | ||
gitignore_excludes: false | ||
gitignore_path: .my_gitignore | ||
line_ending: crlf | ||
formatter: | ||
type: basic | ||
retain_line_breaks_single: true | ||
include_document_start: true |
2 changes: 2 additions & 0 deletions
2
integrationtest/command/testdata/print_conf_file/after/a.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
a: | ||
b: 1 |
11 changes: 11 additions & 0 deletions
11
integrationtest/command/testdata/print_conf_file/before/.yamlfmt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
continue_on_error: false | ||
doublestar: true | ||
exclude: | ||
- "**/templates/*.yaml" | ||
gitignore_excludes: false | ||
gitignore_path: .my_gitignore | ||
line_ending: crlf | ||
formatter: | ||
type: basic | ||
retain_line_breaks_single: true | ||
include_document_start: true |
2 changes: 2 additions & 0 deletions
2
integrationtest/command/testdata/print_conf_file/before/a.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
a: | ||
b: 1 |
Empty file.
26 changes: 26 additions & 0 deletions
26
integrationtest/command/testdata/print_conf_file/stdout/stdout.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
continue_on_error: false | ||
doublestar: true | ||
exclude: | ||
- '**/templates/*.yaml' | ||
extensions: | ||
- yaml | ||
- yml | ||
gitignore_excludes: false | ||
gitignore_path: .my_gitignore | ||
include: [] | ||
line_ending: crlf | ||
output_format: default | ||
regex_exclude: [] | ||
formatter: | ||
disallow_anchors: false | ||
drop_merge_tag: false | ||
include_document_start: true | ||
indent: 2 | ||
indentless_arrays: false | ||
line_ending: crlf | ||
max_line_length: 0 | ||
pad_line_comments: 1 | ||
retain_line_breaks: false | ||
retain_line_breaks_single: true | ||
scan_folded_as_literal: false | ||
type: basic |
2 changes: 2 additions & 0 deletions
2
integrationtest/command/testdata/print_conf_flags/after/a.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
a: | ||
b: 1 |
2 changes: 2 additions & 0 deletions
2
integrationtest/command/testdata/print_conf_flags/before/a.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
a: | ||
b: 1 |
Empty file.
25 changes: 25 additions & 0 deletions
25
integrationtest/command/testdata/print_conf_flags/stdout/stdout.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
continue_on_error: true | ||
doublestar: false | ||
exclude: [] | ||
extensions: | ||
- yaml | ||
- yml | ||
gitignore_excludes: false | ||
gitignore_path: .gitignore | ||
include: [] | ||
line_ending: lf | ||
output_format: default | ||
regex_exclude: [] | ||
formatter: | ||
disallow_anchors: false | ||
drop_merge_tag: false | ||
include_document_start: false | ||
indent: 2 | ||
indentless_arrays: false | ||
line_ending: lf | ||
max_line_length: 0 | ||
pad_line_comments: 1 | ||
retain_line_breaks: true | ||
retain_line_breaks_single: false | ||
scan_folded_as_literal: false | ||
type: basic |
11 changes: 11 additions & 0 deletions
11
integrationtest/command/testdata/print_conf_flags_and_file/after/.yamlfmt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
continue_on_error: false | ||
doublestar: true | ||
exclude: | ||
- "**/templates/*.yaml" | ||
gitignore_excludes: false | ||
gitignore_path: .my_gitignore | ||
line_ending: crlf | ||
formatter: | ||
type: basic | ||
retain_line_breaks_single: true | ||
include_document_start: true |
2 changes: 2 additions & 0 deletions
2
integrationtest/command/testdata/print_conf_flags_and_file/after/a.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
a: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These yaml files can be removed for these |
||
b: 1 |
11 changes: 11 additions & 0 deletions
11
integrationtest/command/testdata/print_conf_flags_and_file/before/.yamlfmt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
continue_on_error: false | ||
doublestar: true | ||
exclude: | ||
- "**/templates/*.yaml" | ||
gitignore_excludes: false | ||
gitignore_path: .my_gitignore | ||
line_ending: crlf | ||
formatter: | ||
type: basic | ||
retain_line_breaks_single: true | ||
include_document_start: true |
2 changes: 2 additions & 0 deletions
2
integrationtest/command/testdata/print_conf_flags_and_file/before/a.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
a: | ||
b: 1 |
Empty file.
26 changes: 26 additions & 0 deletions
26
integrationtest/command/testdata/print_conf_flags_and_file/stdout/stdout.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
continue_on_error: true | ||
doublestar: true | ||
exclude: | ||
- '**/templates/*.yaml' | ||
extensions: | ||
- yaml | ||
- yml | ||
gitignore_excludes: false | ||
gitignore_path: .my_gitignore | ||
include: [] | ||
line_ending: crlf | ||
output_format: default | ||
regex_exclude: [] | ||
formatter: | ||
disallow_anchors: false | ||
drop_merge_tag: false | ||
include_document_start: true | ||
indent: 2 | ||
indentless_arrays: false | ||
line_ending: crlf | ||
max_line_length: 0 | ||
pad_line_comments: 1 | ||
retain_line_breaks: true | ||
retain_line_breaks_single: true | ||
scan_folded_as_literal: false | ||
type: basic |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I didn't think of that