π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Combine mobile lint workflows
Manav Rathieb8fb7cd6321
diff --git a/.github/scripts/get-affected-packages.sh b/.github/scripts/get-affected-packages.shdeleted file mode 100755index 55b82a5e9e..0000000000--- a/.github/scripts/get-affected-packages.sh+++ /dev/null@@ -1,227 +0,0 @@-#!/bin/bash--# Dependency Parser for Mobile Packages-#-# Parses pubspec.yaml files to build a dependency graph and determines-# which packages/apps need to be linted based on what changed.-#-# Usage:-# ./get-affected-packages.sh <changed_file1> <changed_file2> ...-#-# Output (JSON to stdout):-# {-# "packages": "pkg1 pkg2 pkg3",-# "lint_photos": "true/false",-# "lint_auth": "true/false",-# "lint_locker": "true/false",-# "lint_all": "true/false"-# }--set -e--SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"-REPO_ROOT="$SCRIPT_DIR/../.."-PACKAGES_DIR="$REPO_ROOT/mobile/packages"-APPS_DIR="$REPO_ROOT/mobile/apps"--# Parse local dependencies from a pubspec.yaml file-# Returns space-separated list of package names-parse_dependencies() {- local pubspec_file=$1-- if [ ! -f "$pubspec_file" ]; then- echo ""- return- fi-- # Extract dependencies with "path: ../" pattern- # Handle both "../packagename" and "../../packages/packagename"- grep "path:.*\.\./" "$pubspec_file" 2>/dev/null | \- sed 's/.*path: *//' | \- sed 's/[[:space:]]*$//' | \- sed 's/.*\///' | \- tr '\n' ' ' || echo ""-}--# Build dependency graph-# Format: package_name:dep1,dep2,dep3-build_dep_graph() {- local graph=""-- for pkg_dir in "$PACKAGES_DIR"/*/ ; do- if [ ! -d "$pkg_dir" ]; then- continue- fi-- pkg_name=$(basename "$pkg_dir")-- # Skip rust package (handled separately)- if [ "$pkg_name" = "rust" ]; then- continue- fi-- pubspec="$pkg_dir/pubspec.yaml"- deps=$(parse_dependencies "$pubspec")-- # Convert space-separated to comma-separated- deps_csv=$(echo "$deps" | tr ' ' ',')- graph="$graph$pkg_name:$deps_csv"$'\n'- done-- echo "$graph"-}--# Get packages that depend on a given package-get_dependents() {- local target_pkg=$1- local dep_graph=$2- local dependents=""-- while IFS=: read -r pkg deps; do- if [ -z "$pkg" ]; then- continue- fi-- # Check if target_pkg is in deps- if echo ",$deps," | grep -q ",$target_pkg,"; then- dependents="$dependents $pkg"- fi- done <<< "$dep_graph"-- echo "$dependents"-}--# Get all affected packages (transitive)-get_affected_packages() {- local changed_pkgs=$1- local dep_graph=$2-- local affected="$changed_pkgs"- local to_process="$changed_pkgs"-- # Iteratively find all dependents- for _ in {1..10}; do # Max 10 levels of dependency- local new_deps=""-- for pkg in $to_process; do- local deps=$(get_dependents "$pkg" "$dep_graph")- for dep in $deps; do- # Add if not already in affected- if ! echo " $affected " | grep -q " $dep "; then- affected="$affected $dep"- new_deps="$new_deps $dep"- fi- done- done-- if [ -z "$new_deps" ]; then- break- fi-- to_process="$new_deps"- done-- # Sort and deduplicate- echo "$affected" | tr ' ' '\n' | sort -u | tr '\n' ' '-}--# Check if app depends on any of the affected packages-check_app_affected() {- local app_name=$1- local affected_pkgs=$2-- local app_pubspec="$APPS_DIR/$app_name/pubspec.yaml"- local app_deps=$(parse_dependencies "$app_pubspec")-- for pkg in $affected_pkgs; do- if echo " $app_deps " | grep -q " $pkg "; then- echo "true"- return- fi- done-- echo "false"-}--# Main logic-main() {- local changed_files=("$@")-- # Safety checks: lint everything if certain files changed- local lint_all="false"-- if [ ${#changed_files[@]} -eq 0 ]; then- lint_all="true"- fi-- for file in "${changed_files[@]}"; do- if [[ "$file" == *".github/workflows/mobile-packages-lint.yml"* ]] || \- [[ "$file" == *".github/scripts/get-affected-packages.sh"* ]] || \- [[ "$file" == *"mobile/analysis_options.yaml"* ]] || \- [[ "$file" =~ (^|/)pubspec(\.lock|(_overrides)?\.yaml)$ ]]; then- lint_all="true"- break- fi- done-- # If linting all, return all packages- if [ "$lint_all" = "true" ]; then- local all_pkgs=$(find "$PACKAGES_DIR" -maxdepth 1 -type d -not -name "packages" -not -name "rust" -exec basename {} \; | sort | tr '\n' ' ')-- echo "{"- echo " \"packages\": \"$all_pkgs\","- echo " \"lint_photos\": \"true\","- echo " \"lint_auth\": \"true\","- echo " \"lint_locker\": \"true\","- echo " \"lint_all\": \"true\""- echo "}"- return- fi-- # Extract changed package names- local changed_pkgs=""- for file in "${changed_files[@]}"; do- if [[ "$file" =~ mobile/packages/([^/]+)/ ]]; then- pkg_name="${BASH_REMATCH[1]}"- if [ "$pkg_name" != "rust" ]; then- if ! echo " $changed_pkgs " | grep -q " $pkg_name "; then- changed_pkgs="$changed_pkgs $pkg_name"- fi- fi- fi- done-- # If no packages changed, nothing to lint- if [ -z "$(echo $changed_pkgs | tr -d ' ')" ]; then- echo "{"- echo " \"packages\": \"\","- echo " \"lint_photos\": \"false\","- echo " \"lint_auth\": \"false\","- echo " \"lint_locker\": \"false\","- echo " \"lint_all\": \"false\""- echo "}"- return- fi-- # Build dependency graph- local dep_graph=$(build_dep_graph)-- # Get all affected packages- local affected_pkgs=$(get_affected_packages "$changed_pkgs" "$dep_graph")-- # Check which apps are affected- local lint_photos=$(check_app_affected "photos" "$affected_pkgs")- local lint_auth=$(check_app_affected "auth" "$affected_pkgs")- local lint_locker=$(check_app_affected "locker" "$affected_pkgs")-- # Output JSON- echo "{"- echo " \"packages\": \"$affected_pkgs\","- echo " \"lint_photos\": \"$lint_photos\","- echo " \"lint_auth\": \"$lint_auth\","- echo " \"lint_locker\": \"$lint_locker\","- echo " \"lint_all\": \"false\""- echo "}"-}--main "$@"diff --git a/.github/workflows/auth-lint.yml b/.github/workflows/auth-lint.ymldeleted file mode 100644index e95ad2fb67..0000000000--- a/.github/workflows/auth-lint.yml+++ /dev/null@@ -1,96 +0,0 @@-name: "Lint (auth)"--on:- pull_request:- paths:- - ".github/workflows/auth-lint.yml"- - "mobile/apps/auth/**"- - "mobile/scripts/check_source_arb_plurals.rb"--env:- FLUTTER_VERSION: "3.38.10"--permissions:- contents: read--jobs:- auth-lint:- runs-on: macos-26- defaults:- run:- working-directory: mobile/apps/auth- steps:- - name: Checkout code and submodules- uses: actions/checkout@v6- with:- submodules: recursive-- - name: Verify frozen mobile pubspecs- run: ruby mobile/scripts/check_frozen_pubspecs.rb mobile/apps/auth- working-directory: ${{ github.workspace }}-- - name: Verify source ARB plurals- run: ruby mobile/scripts/check_source_arb_plurals.rb- working-directory: ${{ github.workspace }}-- - 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 all icons are less than 20KB- run: |- find assets/custom-icons -type f -name "*.svg" | while read -r file; do- if [[ "$file" == "assets/custom-icons/icons/bbs_nga.svg" ]]; then- continue- fi- if [[ "$(stat --printf="%s" "$file")" -gt 20480 ]]; then- echo "File size is greater than 20KB: $file ($file_size bytes)"- exit 1- fi- done-- - name: Verify custom icon JSON- run: cat assets/custom-icons/_data/custom-icons.json | jq empty-- - name: Verify custom icon hex codes- run: |- jq -r '.icons[] | select(.hex != null) | .hex' assets/custom-icons/_data/custom-icons.json | while read -r hex; do- if [[ -z "$hex" ]]; then- continue- fi- if [[ ! "$hex" =~ ^[0-9a-fA-F]{6}$ ]]; then- echo "Invalid hex color '$hex'. Must be exactly 6 hexadecimal characters."- exit 1- fi- done-- - name: Install Flutter ${{ env.FLUTTER_VERSION }}- uses: subosito/flutter-action@v2- with:- channel: "stable"- flutter-version: ${{ env.FLUTTER_VERSION }}- cache: true-- - name: Generate strings localizations- run: flutter gen-l10n- working-directory: mobile/packages/strings-- - run: flutter pub get --enforce-lockfile-- - name: Check iOS Podfile.lock is current- run: pod install --deployment- working-directory: mobile/apps/auth/ios-- - name: Generate auth localizations- run: flutter gen-l10n-- - run: dart format --output=none --set-exit-if-changed .-- - run: flutter analyze --no-fatal-infos-- - run: flutter testdiff --git a/.github/workflows/locker-lint.yml b/.github/workflows/locker-lint.ymldeleted file mode 100644index 9377a67552..0000000000--- a/.github/workflows/locker-lint.yml+++ /dev/null@@ -1,73 +0,0 @@-name: "Lint (locker)"--on:- # Run on every pull request (open or push to it) that changes locker app- pull_request:- paths:- - ".github/workflows/locker-lint.yml"- - "mobile/apps/locker/**"- - "mobile/packages/contacts/**"- - "mobile/packages/legacy/**"- - "mobile/packages/rust/**"- - "mobile/packages/sharing/**"- - "mobile/scripts/check_source_arb_plurals.rb"- - "rust/bindings/frb/ente-rust/**"- - "rust/apps/codegen/**"- - "rust/Cargo.lock"- - "rust/Cargo.toml"--env:- FLUTTER_VERSION: "3.38.10"--permissions:- contents: read--jobs:- locker-lint:- runs-on: macos-26- defaults:- run:- working-directory: mobile/apps/locker- steps:- - name: Checkout- uses: actions/checkout@v6-- - name: Verify frozen mobile pubspecs- run: ruby mobile/scripts/check_frozen_pubspecs.rb mobile/apps/locker- working-directory: ${{ github.workspace }}-- - name: Verify source ARB plurals- run: ruby mobile/scripts/check_source_arb_plurals.rb- working-directory: ${{ github.workspace }}-- - name: Install Flutter ${{ env.FLUTTER_VERSION }}- uses: subosito/flutter-action@v2- with:- channel: "stable"- flutter-version: ${{ env.FLUTTER_VERSION }}- cache: true-- - run: cargo codegen frb shared- working-directory: rust-- - run: cargo clippy -p ente_rust --features flutter --all-targets --locked -- -D warnings- working-directory: rust-- - name: Generate strings localizations- run: flutter gen-l10n- working-directory: mobile/packages/strings-- - run: flutter pub get --enforce-lockfile-- - name: Check iOS Podfile.lock is current- run: pod install --deployment- working-directory: mobile/apps/locker/ios-- - name: Generate locker localizations- run: flutter gen-l10n-- - run: dart format --output=none --set-exit-if-changed .-- - run: flutter analyze --no-fatal-infos-- - run: flutter testdiff --git a/.github/workflows/mobile-lint.yml b/.github/workflows/mobile-lint.ymlindex 0646e76811..72054a905c 100644--- a/.github/workflows/mobile-lint.yml+++ b/.github/workflows/mobile-lint.yml@@ -1,21 +1,19 @@-name: "Lint (photos)"+name: "Lint (mobile)"on:- # Run on every pull request (open or push to it) that changes the photos app,- # Photos Rust, or shared Rust crates used by Photospull_request:paths:- ".github/workflows/mobile-lint.yml"- - "mobile/apps/photos/**"- - "mobile/scripts/check_source_arb_plurals.rb"- - "rust/crates/photos/**"- - "rust/crates/core/**"- - "rust/crates/contacts/**"- - "rust/crates/image/**"- - "rust/bindings/frb/**"+ - "mobile/**"- "rust/apps/codegen/**"+ - "rust/bindings/frb/**"- "rust/Cargo.lock"- "rust/Cargo.toml"+ - "rust/crates/contacts/**"+ - "rust/crates/core/**"+ - "rust/crates/image/**"+ - "rust/crates/photos/**"+ workflow_dispatch:env:FLUTTER_VERSION: "3.38.10"@@ -24,44 +22,99 @@ permissions:contents: readjobs:- photos-lint:+ lint:runs-on: macos-26- defaults:- run:- working-directory: mobile/apps/photossteps:- - name: Checkout+ - name: Checkout code and submodulesuses: actions/checkout@v6+ with:+ submodules: recursive- name: Verify frozen mobile pubspecs- run: ruby mobile/scripts/check_frozen_pubspecs.rb mobile/apps/photos- working-directory: ${{ github.workspace }}+ run: ruby mobile/scripts/check_frozen_pubspecs.rb mobile- name: Verify source ARB pluralsrun: ruby mobile/scripts/check_source_arb_plurals.rb- working-directory: ${{ github.workspace }}- - name: Install Flutter ${{ env.FLUTTER_VERSION }}+ - name: Verify auth custom icons+ run: |+ find assets/custom-icons -type f -name "*.svg" | while read -r file; do+ name=$(basename "$file")+ if [[ "$name" != "$(printf "%s" "$name" | tr '[:upper:]' '[:lower:]' | tr ' ' '_')" ]]; then+ echo "File name is not lowercase: $file"+ exit 1+ fi++ if [[ "$file" == "assets/custom-icons/icons/bbs_nga.svg" ]]; then+ continue+ fi++ size=$(wc -c < "$file")+ if (( size > 20480 )); then+ echo "File size is greater than 20KB: $file ($size bytes)"+ exit 1+ fi+ done++ jq empty assets/custom-icons/_data/custom-icons.json+ jq -r '.icons[] | select(.hex != null) | .hex' assets/custom-icons/_data/custom-icons.json | while read -r hex; do+ if [[ -n "$hex" && ! "$hex" =~ ^[0-9a-fA-F]{6}$ ]]; then+ echo "Invalid hex color '$hex'. Must be exactly 6 hexadecimal characters."+ exit 1+ fi+ done+ working-directory: mobile/apps/auth++ - name: Install Flutter ${{ env.FLUTTER_VERSION }}uses: subosito/flutter-action@v2with:channel: "stable"- flutter-version: ${{ env.FLUTTER_VERSION }}+ flutter-version: ${{ env.FLUTTER_VERSION }}cache: true- - run: flutter pub get --enforce-lockfile-- run: cargo codegen frbworking-directory: rust- - name: Check iOS Podfile.lock is current- run: pod install --deployment- working-directory: mobile/apps/photos/ios-- run: cargo clippy -p ente_photos_rust --features flutter --all-targets --locked -- -D warningsworking-directory: rust- - run: dart format --output=none --set-exit-if-changed .+ - run: cargo clippy -p ente_rust --features flutter --all-targets --locked -- -D warnings+ working-directory: rust++ - name: Generate strings localizations+ run: flutter gen-l10n+ working-directory: mobile/packages/strings- - run: flutter analyze --no-fatal-infos+ - name: Lint packages+ run: |+ for pubspec in mobile/packages/*/pubspec.yaml; do+ package_dir=${pubspec%/pubspec.yaml}+ package=${package_dir##*/}+ echo "Linting $package"+ (+ cd "$package_dir"+ flutter pub get --enforce-lockfile+ dart format --output=none --set-exit-if-changed .+ flutter analyze --no-fatal-infos+ if [[ "$package" == "local_auth_linux" ]]; then+ flutter test+ fi+ )+ done- - run: flutter test+ - name: Lint apps+ run: |+ for app in photos auth locker; do+ echo "Linting $app"+ (+ cd "mobile/apps/$app"+ flutter pub get --enforce-lockfile+ (cd ios && pod install --deployment)+ if [[ "$app" != "photos" ]]; then+ flutter gen-l10n+ fi+ dart format --output=none --set-exit-if-changed .+ flutter analyze --no-fatal-infos+ flutter test+ )+ donediff --git a/.github/workflows/mobile-packages-lint.yml b/.github/workflows/mobile-packages-lint.ymldeleted file mode 100644index 45105a5a41..0000000000--- a/.github/workflows/mobile-packages-lint.yml+++ /dev/null@@ -1,282 +0,0 @@-name: "Lint (mobile packages)"--on:- pull_request:- paths:- - "mobile/packages/**"- - "mobile/**/pubspec*.yaml"- - "mobile/**/pubspec.lock"- - ".github/workflows/mobile-packages-lint.yml"- - "mobile/scripts/check_frozen_pubspecs.rb"- - "mobile/scripts/check_source_arb_plurals.rb"- - ".github/scripts/get-affected-packages.sh"- - "mobile/analysis_options.yaml"- # Allow manual trigger for testing- workflow_dispatch:--env:- FLUTTER_VERSION: "3.38.10"--permissions:- contents: read--jobs:- detect-changes:- runs-on: ubuntu-latest- outputs:- packages: ${{ steps.filter.outputs.packages }}- lint_photos: ${{ steps.filter.outputs.lint_photos }}- lint_auth: ${{ steps.filter.outputs.lint_auth }}- lint_locker: ${{ steps.filter.outputs.lint_locker }}- lint_all: ${{ steps.filter.outputs.lint_all }}- steps:- - name: Checkout code- uses: actions/checkout@v6-- - name: Determine affected packages- id: filter- run: |- # Get list of changed files- CHANGED_FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} || echo "")-- # Run dependency analyzer- RESULT=$(./.github/scripts/get-affected-packages.sh $CHANGED_FILES)-- echo "Analysis result:"- echo "$RESULT"-- # Extract values from JSON- PACKAGES=$(echo "$RESULT" | jq -r '.packages')- LINT_PHOTOS=$(echo "$RESULT" | jq -r '.lint_photos')- LINT_AUTH=$(echo "$RESULT" | jq -r '.lint_auth')- LINT_LOCKER=$(echo "$RESULT" | jq -r '.lint_locker')- LINT_ALL=$(echo "$RESULT" | jq -r '.lint_all')-- # Set outputs- echo "packages=$PACKAGES" >> $GITHUB_OUTPUT- echo "lint_photos=$LINT_PHOTOS" >> $GITHUB_OUTPUT- echo "lint_auth=$LINT_AUTH" >> $GITHUB_OUTPUT- echo "lint_locker=$LINT_LOCKER" >> $GITHUB_OUTPUT- echo "lint_all=$LINT_ALL" >> $GITHUB_OUTPUT-- echo "Affected packages: $PACKAGES"- echo "Lint photos: $LINT_PHOTOS"- echo "Lint auth: $LINT_AUTH"- echo "Lint locker: $LINT_LOCKER"- echo "Lint all: $LINT_ALL"-- pubspec-constraints:- runs-on: ubuntu-latest- if: github.event_name == 'pull_request'- steps:- - name: Checkout code- uses: actions/checkout@v6-- - name: Verify frozen mobile pubspecs- run: ruby mobile/scripts/check_frozen_pubspecs.rb mobile-- - name: Verify source ARB plurals- run: ruby mobile/scripts/check_source_arb_plurals.rb-- packages-lint:- needs: detect-changes- runs-on: ubuntu-latest- # Skip if no packages need linting- if: needs.detect-changes.outputs.lint_all == 'true' || needs.detect-changes.outputs.packages != ''- steps:- - name: Checkout code- uses: actions/checkout@v6-- - name: Install Flutter ${{ env.FLUTTER_VERSION }}- uses: subosito/flutter-action@v2- with:- channel: "stable"- flutter-version: ${{ env.FLUTTER_VERSION }}- cache: true-- - run: cargo codegen frb shared- working-directory: rust-- - run: cargo clippy -p ente_rust --features flutter --all-targets --locked -- -D warnings- working-directory: rust-- - name: Generate strings localizations- run: flutter gen-l10n- working-directory: mobile/packages/strings-- # Lint all affected packages conditionally- - name: Lint package - accounts- if: needs.detect-changes.outputs.lint_all == 'true' || contains(needs.detect-changes.outputs.packages, 'accounts')- run: flutter pub get --enforce-lockfile && dart format --output=none --set-exit-if-changed . && flutter analyze --no-fatal-infos- working-directory: mobile/packages/accounts-- - name: Lint package - base- if: needs.detect-changes.outputs.lint_all == 'true' || contains(needs.detect-changes.outputs.packages, 'base')- run: flutter pub get --enforce-lockfile && dart format --output=none --set-exit-if-changed . && flutter analyze --no-fatal-infos- working-directory: mobile/packages/base-- - name: Lint package - configuration- if: needs.detect-changes.outputs.lint_all == 'true' || contains(needs.detect-changes.outputs.packages, 'configuration')- run: flutter pub get --enforce-lockfile && dart format --output=none --set-exit-if-changed . && flutter analyze --no-fatal-infos- working-directory: mobile/packages/configuration-- - name: Lint package - scoped_dir_access- if: needs.detect-changes.outputs.lint_all == 'true' || contains(needs.detect-changes.outputs.packages, 'scoped_dir_access')- run: flutter pub get --enforce-lockfile && dart format --output=none --set-exit-if-changed . && flutter analyze --no-fatal-infos- working-directory: mobile/packages/scoped_dir_access-- - name: Lint package - ente_crypto_api- if: needs.detect-changes.outputs.lint_all == 'true' || contains(needs.detect-changes.outputs.packages, 'ente_crypto_api')- run: flutter pub get --enforce-lockfile && dart format --output=none --set-exit-if-changed . && flutter analyze --no-fatal-infos- working-directory: mobile/packages/ente_crypto_api-- - name: Lint package - ente_crypto_dart_adapter- if: needs.detect-changes.outputs.lint_all == 'true' || contains(needs.detect-changes.outputs.packages, 'ente_crypto_dart_adapter')- run: flutter pub get --enforce-lockfile && dart format --output=none --set-exit-if-changed . && flutter analyze --no-fatal-infos- working-directory: mobile/packages/ente_crypto_dart_adapter-- - name: Lint package - ente_icons- if: needs.detect-changes.outputs.lint_all == 'true' || contains(needs.detect-changes.outputs.packages, 'ente_icons')- run: flutter pub get --enforce-lockfile && dart format --output=none --set-exit-if-changed . && flutter analyze --no-fatal-infos- working-directory: mobile/packages/ente_icons-- - name: Lint package - ente_pure_utils- if: needs.detect-changes.outputs.lint_all == 'true' || contains(needs.detect-changes.outputs.packages, 'ente_pure_utils')- run: flutter pub get --enforce-lockfile && dart format --output=none --set-exit-if-changed . && flutter analyze --no-fatal-infos- working-directory: mobile/packages/ente_pure_utils-- - name: Lint package - events- if: needs.detect-changes.outputs.lint_all == 'true' || contains(needs.detect-changes.outputs.packages, 'events')- run: flutter pub get --enforce-lockfile && dart format --output=none --set-exit-if-changed . && flutter analyze --no-fatal-infos- working-directory: mobile/packages/events-- - name: Lint package - legacy- if: needs.detect-changes.outputs.lint_all == 'true' || contains(needs.detect-changes.outputs.packages, 'legacy')- run: flutter pub get --enforce-lockfile && dart format --output=none --set-exit-if-changed . && flutter analyze --no-fatal-infos- working-directory: mobile/packages/legacy-- - name: Lint package - local_auth_linux- if: needs.detect-changes.outputs.lint_all == 'true' || contains(needs.detect-changes.outputs.packages, 'local_auth_linux')- run: flutter pub get --enforce-lockfile && dart format --output=none --set-exit-if-changed . && flutter analyze --no-fatal-infos && flutter test- working-directory: mobile/packages/local_auth_linux-- - name: Lint package - lock_screen- if: needs.detect-changes.outputs.lint_all == 'true' || contains(needs.detect-changes.outputs.packages, 'lock_screen')- run: flutter pub get --enforce-lockfile && dart format --output=none --set-exit-if-changed . && flutter analyze --no-fatal-infos- working-directory: mobile/packages/lock_screen-- - name: Lint package - log_viewer- if: needs.detect-changes.outputs.lint_all == 'true' || contains(needs.detect-changes.outputs.packages, 'log_viewer')- run: flutter pub get --enforce-lockfile && dart format --output=none --set-exit-if-changed . && flutter analyze --no-fatal-infos- working-directory: mobile/packages/log_viewer-- - name: Lint package - logging- if: needs.detect-changes.outputs.lint_all == 'true' || contains(needs.detect-changes.outputs.packages, 'logging')- run: flutter pub get --enforce-lockfile && dart format --output=none --set-exit-if-changed . && flutter analyze --no-fatal-infos- working-directory: mobile/packages/logging-- - name: Lint package - native_video_editor- if: needs.detect-changes.outputs.lint_all == 'true' || contains(needs.detect-changes.outputs.packages, 'native_video_editor')- run: flutter pub get --enforce-lockfile && dart format --output=none --set-exit-if-changed . && flutter analyze --no-fatal-infos- working-directory: mobile/packages/native_video_editor-- - name: Lint package - network- if: needs.detect-changes.outputs.lint_all == 'true' || contains(needs.detect-changes.outputs.packages, 'network')- run: flutter pub get --enforce-lockfile && dart format --output=none --set-exit-if-changed . && flutter analyze --no-fatal-infos- working-directory: mobile/packages/network-- - name: Lint package - qr- if: needs.detect-changes.outputs.lint_all == 'true' || contains(needs.detect-changes.outputs.packages, 'qr')- run: flutter pub get --enforce-lockfile && dart format --output=none --set-exit-if-changed . && flutter analyze --no-fatal-infos- working-directory: mobile/packages/qr-- - name: Lint package - sharing- if: needs.detect-changes.outputs.lint_all == 'true' || contains(needs.detect-changes.outputs.packages, 'sharing')- run: flutter pub get --enforce-lockfile && dart format --output=none --set-exit-if-changed . && flutter analyze --no-fatal-infos- working-directory: mobile/packages/sharing-- - name: Lint package - strings- if: needs.detect-changes.outputs.lint_all == 'true' || contains(needs.detect-changes.outputs.packages, 'strings')- run: flutter pub get --enforce-lockfile && dart format --output=none --set-exit-if-changed . && flutter analyze --no-fatal-infos- working-directory: mobile/packages/strings-- - name: Lint package - ui- if: needs.detect-changes.outputs.lint_all == 'true' || contains(needs.detect-changes.outputs.packages, 'ui')- run: flutter pub get --enforce-lockfile && dart format --output=none --set-exit-if-changed . && flutter analyze --no-fatal-infos- working-directory: mobile/packages/ui-- - name: Lint package - utils- if: needs.detect-changes.outputs.lint_all == 'true' || contains(needs.detect-changes.outputs.packages, 'utils')- run: flutter pub get --enforce-lockfile && dart format --output=none --set-exit-if-changed . && flutter analyze --no-fatal-infos- working-directory: mobile/packages/utils-- apps-lint:- needs: detect-changes- runs-on: ubuntu-latest- if: needs.detect-changes.outputs.lint_photos == 'true' || needs.detect-changes.outputs.lint_auth == 'true' || needs.detect-changes.outputs.lint_locker == 'true'- steps:- - name: Checkout code and submodules- if: needs.detect-changes.outputs.lint_auth == 'true'- uses: actions/checkout@v6- with:- submodules: recursive-- - name: Checkout code- if: needs.detect-changes.outputs.lint_auth != 'true'- uses: actions/checkout@v6-- - name: Install Flutter ${{ env.FLUTTER_VERSION }}- uses: subosito/flutter-action@v2- with:- channel: "stable"- flutter-version: ${{ env.FLUTTER_VERSION }}- cache: true-- - if: needs.detect-changes.outputs.lint_photos == 'true'- run: cargo codegen frb- working-directory: rust-- - if: needs.detect-changes.outputs.lint_photos != 'true' && needs.detect-changes.outputs.lint_locker == 'true'- run: cargo codegen frb shared- working-directory: rust-- - if: needs.detect-changes.outputs.lint_photos == 'true'- run: cargo clippy -p ente_photos_rust --features flutter --all-targets --locked -- -D warnings- working-directory: rust-- - if: needs.detect-changes.outputs.lint_locker == 'true'- run: cargo clippy -p ente_rust --features flutter --all-targets --locked -- -D warnings- working-directory: rust-- - name: Generate strings localizations- run: flutter gen-l10n- working-directory: mobile/packages/strings-- - name: Lint app - photos- if: needs.detect-changes.outputs.lint_photos == 'true'- run: |- flutter pub get --enforce-lockfile- dart format --output=none --set-exit-if-changed .- flutter analyze --no-fatal-infos- flutter test- working-directory: mobile/apps/photos-- - name: Lint app - auth- if: needs.detect-changes.outputs.lint_auth == 'true'- run: |- flutter pub get --enforce-lockfile- flutter gen-l10n- dart format --output=none --set-exit-if-changed .- flutter analyze --no-fatal-infos- flutter test- working-directory: mobile/apps/auth-- - name: Lint app - locker- if: needs.detect-changes.outputs.lint_locker == 'true'- run: |- flutter pub get --enforce-lockfile- flutter gen-l10n- dart format --output=none --set-exit-if-changed .- flutter analyze --no-fatal-infos- flutter test- working-directory: mobile/apps/locker