From 18f32e51b463f050216f9a4d5a0a7e2ea27f4127 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 9 Jun 2023 18:24:51 +0200 Subject: [PATCH] Prevent direct usage of `io.element.android.libraries.ui.strings.R` package. --- tools/check/forbidden_strings_in_code.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/check/forbidden_strings_in_code.txt b/tools/check/forbidden_strings_in_code.txt index ae346c170d..41a6c16466 100755 --- a/tools/check/forbidden_strings_in_code.txt +++ b/tools/check/forbidden_strings_in_code.txt @@ -129,3 +129,6 @@ System\.currentTimeMillis\(\)===1 ### Suspicious String template. Please check that the string template will behave as expected, i.e. the class field and not the whole object will be used. For instance `Timber.d("$event.type")` is not correct, you should write `Timber.d("${event.type}")`. In the former the whole event content will be logged, since it's a data class. If this is expected (i.e. to fix false positive), please add explicit curly braces (`{` and `}`) around the variable, for instance `"elementLogs.${i}.txt"` \$[a-zA-Z_]\w*\??\.[a-zA-Z_] + +### Use `import io.element.android.libraries.ui.strings.R as StringsR` then `StringR.string.` instead +io\.element\.android\.libraries\.ui\.strings\.R\.