Skip to content

Commit

Permalink
Fix failing regex checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
BenHenning committed Sep 14, 2021
1 parent ceb66d9 commit 6d556fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/assets/file_content_validation_checks.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ file_content_checks {
prohibited_content_regex: "(format|getString|getStringArray|getQuantityString|getQuantityText|toLowerCase|toUpperCase|capitalize|decapitalize|lowercase|uppercase)\\("
failure_message: "String formatting and resource retrieval should go through AppLanguageResourceHandler, OppiaLocale.DisplayLocale, or OppiaLocale.MachineLocale depending on the context (see each class's documentation for details on when each should be used)."
exempted_file_name: "domain/src/main/java/org/oppia/android/domain/locale/DisplayLocaleImpl.kt"
exempted_file_name: "domain/src/main/java/org/oppia/android/domain/locale/MachineLocaleImpl.kt"
exempted_file_name: "domain/src/main/java/org/oppia/android/domain/locale/OppiaLocale.kt"
exempted_file_name: "domain/src/main/java/org/oppia/android/domain/util/JsonExtensions.kt"
exempted_file_name: "domain/src/main/java/org/oppia/android/domain/util/WorkDataExtensions.kt"
exempted_file_name: "domain/src/test/java/org/oppia/android/domain/onboarding/AppStartupStateControllerTest.kt"
exempted_file_name: "testing/src/main/java/org/oppia/android/testing/OppiaTestRunner.kt"
exempted_file_name: "testing/src/main/java/org/oppia/android/testing/time/FakeOppiaClock.kt"
exempted_file_name: "utility/src/main/java/org/oppia/android/util/extensions/BundleExtensions.kt"
exempted_file_name: "utility/src/main/java/org/oppia/android/util/locale/MachineLocaleImpl.kt"
exempted_file_patterns: "app/src/test/.+?Test\\.kt"
exempted_file_patterns: "app/src/sharedTest/.+?Test\\.kt"
exempted_file_patterns: "scripts/.+"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ sealed class OppiaLocale {
abstract fun computeDateTimeString(timestampMillis: Long): String

// TODO: mention bidi wrapping (only applied to strings) & machine readable args
// TODO: document that receiver is the format (unlike String.format()).
// TODO: document that receiver is the format (unlike String.format).
abstract fun String.formatInLocale(vararg args: Any?): String

abstract fun String.capitalizeForHumans(): String
Expand Down

0 comments on commit 6d556fb

Please sign in to comment.