Skip to content

Commit

Permalink
feat: Add option to pass diff_args in write_source_files macro
Browse files Browse the repository at this point in the history
  • Loading branch information
r0bobo committed Jan 30, 2025
1 parent 63c1f4d commit 1054715
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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

0 comments on commit 1054715

Please sign in to comment.