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>
This commit is contained in:
Ryan Harrison 2022-02-17 15:03:19 +00:00 committed by Tint LUCI CQ
parent c9735450c0
commit 555e94e7e3
4 changed files with 17 additions and 7 deletions

View File

@ -145,7 +145,16 @@ def CheckChange(input_api, output_api):
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

View File

@ -144,13 +144,13 @@ extern "C" size_t LLVMFuzzerCustomMutator(uint8_t* data,
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)) {

View File

@ -121,8 +121,8 @@ void RemovePhonies::Run(CloneContext& ctx, const DataMap&, DataMap&) const {
}
// 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) {

View File

@ -197,8 +197,9 @@ type example struct {
// 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 {