From 7eec98ea23cf36cb0dd77a9ba210e1f56ff62b56 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 3 Mar 2021 18:08:05 +0100 Subject: [PATCH] Ensure we will not use the template string by mistake --- tools/check/forbidden_strings_in_code.txt | 3 +++ tools/check/forbidden_strings_in_resources.txt | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tools/check/forbidden_strings_in_code.txt b/tools/check/forbidden_strings_in_code.txt index 9d22f882c6..98c49d6549 100644 --- a/tools/check/forbidden_strings_in_code.txt +++ b/tools/check/forbidden_strings_in_code.txt @@ -175,3 +175,6 @@ PreferenceManager\.getDefaultSharedPreferences==2 ### Use ViewBindings # findViewById + +### Do not use `template_` string. Please remove the prefix `template_` to use the generated resource instead. +R\.string\.template_ \ No newline at end of file diff --git a/tools/check/forbidden_strings_in_resources.txt b/tools/check/forbidden_strings_in_resources.txt index 6fb6b184ba..cefeeb6351 100644 --- a/tools/check/forbidden_strings_in_resources.txt +++ b/tools/check/forbidden_strings_in_resources.txt @@ -40,6 +40,9 @@ android\:summary=\"[^@|\%s] app\:ms_floatingLabelText=\"[^@] app\:ms_hint=\"[^@] +### Do not use `template_` string. Please remove the prefix `template_` to use the generated resource instead. +\"@string/template_ + ### "DO NOT COMMIT" has been committed DO NOT COMMIT