Skip to content

Commit 475f87a

Browse files
authored
feat: Add option to pass diff_args in write_source_files macro (#1041)
1 parent a7adbfb commit 475f87a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

docs/write_source_files.md

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/write_source_files.bzl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ def write_source_files(
114114
suggested_update_target = None,
115115
diff_test = True,
116116
diff_test_failure_message = "{{DEFAULT_MESSAGE}}",
117+
diff_args = [],
117118
file_missing_failure_message = "{{DEFAULT_MESSAGE}}",
118119
check_that_out_file_exists = True,
119120
**kwargs):
@@ -158,6 +159,8 @@ def write_source_files(
158159
`{{SUGGESTED_UPDATE_TARGET}}`: The suggested_update_target if specified, or the
159160
target which will update all of the files which do not match.
160161
162+
diff_args: Arguments to pass to the `diff` command. (Ignored on Windows)
163+
161164
file_missing_failure_message: Text to print when the output file is missing. Subject to the same
162165
substitutions as diff_test_failure_message.
163166
@@ -194,6 +197,7 @@ def write_source_files(
194197
suggested_update_target = this_suggested_update_target,
195198
diff_test = diff_test,
196199
diff_test_failure_message = diff_test_failure_message,
200+
diff_args = diff_args,
197201
file_missing_failure_message = file_missing_failure_message,
198202
check_that_out_file_exists = check_that_out_file_exists,
199203
**kwargs

0 commit comments

Comments
 (0)