From 71fcce5f01209c57e9558a8a8c241d2197cd3aa0 Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Wed, 4 Dec 2024 09:48:07 +0530 Subject: [PATCH] [auth] Add Lint validation for custom icon name --- .github/workflows/auth-lint.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/auth-lint.yml b/.github/workflows/auth-lint.yml index bad2539c30..53d5047113 100644 --- a/.github/workflows/auth-lint.yml +++ b/.github/workflows/auth-lint.yml @@ -33,5 +33,15 @@ jobs: - run: flutter analyze --no-fatal-infos + - name: Verify custom icons are lowercase including optional understores, and end with .svg + run: | + find assets/custom-icons -type f -name "*.svg" | while read -r file; do + if [[ "$(basename "$file")" != "$(basename "$file" | tr '[:upper:]' '[:lower:]' | tr ' ' '_')" ]]; then + echo "File name is not lowercase: $file" + exit 1 + fi + done + + - name: Verify custom icon JSON run: cat assets/custom-icons/_data/custom-icons.json | jq empty