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

feat: Add option to pass diff_args in write_source_files macro #1041

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/write_source_files.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions lib/write_source_files.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ def write_source_files(
suggested_update_target = None,
diff_test = True,
diff_test_failure_message = "{{DEFAULT_MESSAGE}}",
diff_args = [],
file_missing_failure_message = "{{DEFAULT_MESSAGE}}",
check_that_out_file_exists = True,
**kwargs):
Expand Down Expand Up @@ -158,6 +159,8 @@ def write_source_files(
`{{SUGGESTED_UPDATE_TARGET}}`: The suggested_update_target if specified, or the
target which will update all of the files which do not match.

diff_args: Arguments to pass to the `diff` command. (Ignored on Windows)

file_missing_failure_message: Text to print when the output file is missing. Subject to the same
substitutions as diff_test_failure_message.

Expand Down Expand Up @@ -194,6 +197,7 @@ def write_source_files(
suggested_update_target = this_suggested_update_target,
diff_test = diff_test,
diff_test_failure_message = diff_test_failure_message,
diff_args = diff_args,
file_missing_failure_message = file_missing_failure_message,
check_that_out_file_exists = check_that_out_file_exists,
**kwargs
Expand Down
Loading