Skip to content

Commit

Permalink
check: Add suite l10n
Browse files Browse the repository at this point in the history
  • Loading branch information
rajveermalviya committed Nov 15, 2024
1 parent deb73d5 commit cc0ceec
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions tools/check
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ this_dir=${BASH_SOURCE[0]%/*}

default_suites=(
analyze test
build_runner drift pigeon icons
l10n build_runner drift pigeon icons
android # This takes multiple minutes in CI, so do it last.
)

Expand Down Expand Up @@ -82,7 +82,7 @@ while (( $# )); do
--all) opt_files=all; opt_all=1; shift;;
--fix) opt_fix=1; shift;;
--verbose) opt_verbose=1; shift;;
analyze|test|build_runner|drift|pigeon|icons|android|shellcheck)
analyze|test|l10n|build_runner|drift|pigeon|icons|android|shellcheck)
opt_suites+=("$1"); shift;;
*) usage;;
esac
Expand Down Expand Up @@ -241,6 +241,19 @@ should_run_build_runner() {
return 1
}

run_l10n() {
files_check lib/generated/l10n/'*'.dart \
|| return 0

check_no_uncommitted_or_untracked lib/generated/l10n/'*'.dart \
|| return

flutter gen-l10n > /dev/null \
|| return

check_no_changes "updates to l10n" lib/generated/l10n/'*'.dart
}

run_build_runner() {
should_run_build_runner \
|| return 0
Expand Down Expand Up @@ -443,6 +456,7 @@ for suite in "${opt_suites[@]}"; do
case "$suite" in
analyze) run_analyze ;;
test) run_test ;;
l10n) run_l10n ;;
build_runner) run_build_runner ;;
drift) run_drift ;;
pigeon) run_pigeon ;;
Expand Down

0 comments on commit cc0ceec

Please sign in to comment.