Fix legacy non-inclusive language issues
Explicitly filters out problematic files from presubmit with issues
that are not under our control, i.e. URLs.
BUG=tint:1433
Change-Id: I34a449c825edc39f934cbe9afa3436f7514f2808
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/80860
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 7e019b7..97623c1 100755
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -145,7 +145,16 @@
results += input_api.canned_checks.CheckChangeLintsClean(input_api,
output_api,
lint_filters="")
- results += CheckNonInclusiveLanguage(input_api, output_api)
+
+ def NonInclusiveFileFilter(file):
+ filter_list = [
+ "docs/tint/spirv-input-output-variables.md", # External URL
+ "test/tint/samples/compute_boids.wgsl ", # External URL
+ ]
+ return file in filter_list
+
+ results += CheckNonInclusiveLanguage(input_api, output_api,
+ NonInclusiveFileFilter)
return results
diff --git a/fuzzers/tint_spirv_tools_fuzzer/fuzzer.cc b/fuzzers/tint_spirv_tools_fuzzer/fuzzer.cc
index 9e0e8fa..2cc1293 100644
--- a/fuzzers/tint_spirv_tools_fuzzer/fuzzer.cc
+++ b/fuzzers/tint_spirv_tools_fuzzer/fuzzer.cc
@@ -144,13 +144,13 @@
std::vector<uint32_t> binary(size / sizeof(uint32_t));
std::memcpy(binary.data(), data, size);
- MutatorCache dummy_cache(1);
+ MutatorCache placeholder_cache(1);
auto* mutator_cache = context->mutator_cache.get();
if (!mutator_cache) {
// Use a placeholder cache if the user has decided not to use a real cache.
// The placeholder cache will be destroyed when we return from this function
// but it will save us from writing all the `if (mutator_cache)` below.
- mutator_cache = &dummy_cache;
+ mutator_cache = &placeholder_cache;
}
if (!mutator_cache->Get(binary)) {
diff --git a/src/transform/remove_phonies.cc b/src/transform/remove_phonies.cc
index 9555f0a..5c600eb 100644
--- a/src/transform/remove_phonies.cc
+++ b/src/transform/remove_phonies.cc
@@ -121,8 +121,8 @@
}
// Phony assignment with multiple side effects.
- // Generate a call to a dummy function with the side effects as
- // arguments.
+ // Generate a call to a placeholder function with the side
+ // effects as arguments.
ctx.Replace(stmt, [&, side_effects] {
SinkSignature sig;
for (auto* arg : side_effects) {
diff --git a/tools/src/cmd/check-spec-examples/main.go b/tools/src/cmd/check-spec-examples/main.go
index 760fb68..0b89126 100644
--- a/tools/src/cmd/check-spec-examples/main.go
+++ b/tools/src/cmd/check-spec-examples/main.go
@@ -197,8 +197,9 @@
// tryCompile attempts to compile the example e in the directory wd, using the
// compiler at the given path. If the example is annotated with 'function-scope'
// then the code is wrapped with a basic vertex-stage-entry function.
-// If the first compile fails then a dummy vertex-state-entry function is
-// appended to the source, and another attempt to compile the shader is made.
+// If the first compile fails then a placeholder vertex-state-entry
+// function is appended to the source, and another attempt to compile
+// the shader is made.
func tryCompile(compiler, wd string, e example) error {
code := e.code
if e.functionScope {