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:
parent
c9735450c0
commit
555e94e7e3
11
PRESUBMIT.py
11
PRESUBMIT.py
|
@ -145,7 +145,16 @@ def CheckChange(input_api, output_api):
|
||||||
results += input_api.canned_checks.CheckChangeLintsClean(input_api,
|
results += input_api.canned_checks.CheckChangeLintsClean(input_api,
|
||||||
output_api,
|
output_api,
|
||||||
lint_filters="")
|
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
|
return results
|
||||||
|
|
||||||
|
|
|
@ -144,13 +144,13 @@ extern "C" size_t LLVMFuzzerCustomMutator(uint8_t* data,
|
||||||
std::vector<uint32_t> binary(size / sizeof(uint32_t));
|
std::vector<uint32_t> binary(size / sizeof(uint32_t));
|
||||||
std::memcpy(binary.data(), data, size);
|
std::memcpy(binary.data(), data, size);
|
||||||
|
|
||||||
MutatorCache dummy_cache(1);
|
MutatorCache placeholder_cache(1);
|
||||||
auto* mutator_cache = context->mutator_cache.get();
|
auto* mutator_cache = context->mutator_cache.get();
|
||||||
if (!mutator_cache) {
|
if (!mutator_cache) {
|
||||||
// Use a placeholder cache if the user has decided not to use a real 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
|
// 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.
|
// 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)) {
|
if (!mutator_cache->Get(binary)) {
|
||||||
|
|
|
@ -121,8 +121,8 @@ void RemovePhonies::Run(CloneContext& ctx, const DataMap&, DataMap&) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Phony assignment with multiple side effects.
|
// Phony assignment with multiple side effects.
|
||||||
// Generate a call to a dummy function with the side effects as
|
// Generate a call to a placeholder function with the side
|
||||||
// arguments.
|
// effects as arguments.
|
||||||
ctx.Replace(stmt, [&, side_effects] {
|
ctx.Replace(stmt, [&, side_effects] {
|
||||||
SinkSignature sig;
|
SinkSignature sig;
|
||||||
for (auto* arg : side_effects) {
|
for (auto* arg : side_effects) {
|
||||||
|
|
|
@ -197,8 +197,9 @@ type example struct {
|
||||||
// tryCompile attempts to compile the example e in the directory wd, using the
|
// 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'
|
// 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.
|
// 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
|
// If the first compile fails then a placeholder vertex-state-entry
|
||||||
// appended to the source, and another attempt to compile the shader is made.
|
// function is appended to the source, and another attempt to compile
|
||||||
|
// the shader is made.
|
||||||
func tryCompile(compiler, wd string, e example) error {
|
func tryCompile(compiler, wd string, e example) error {
|
||||||
code := e.code
|
code := e.code
|
||||||
if e.functionScope {
|
if e.functionScope {
|
||||||
|
|
Loading…
Reference in New Issue