Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Add mobile Dart format check

Manav Rathi826c534d3fa4
diff --git a/.github/workflows/auth-lint.yml b/.github/workflows/auth-lint.yml
index 950e85a2e6..5b4257aea6 100644
--- a/.github/workflows/auth-lint.yml
+++ b/.github/workflows/auth-lint.yml
@@ -86,6 +86,8 @@ jobs:
- name: Generate auth localizations
run: flutter gen-l10n
+ - run: dart format --output=none --set-exit-if-changed .
+
- name: Analyze auth
run: flutter analyze --no-fatal-infos
diff --git a/.github/workflows/locker-lint.yml b/.github/workflows/locker-lint.yml
index 5b222cd389..822bc58f59 100644
--- a/.github/workflows/locker-lint.yml
+++ b/.github/workflows/locker-lint.yml
@@ -62,6 +62,8 @@ jobs:
- name: Generate locker localizations
run: flutter gen-l10n
+ - run: dart format --output=none --set-exit-if-changed .
+
- name: Analyze locker
run: flutter analyze --no-fatal-infos
diff --git a/.github/workflows/mobile-lint.yml b/.github/workflows/mobile-lint.yml
index c7d35c1352..9dcc584083 100644
--- a/.github/workflows/mobile-lint.yml
+++ b/.github/workflows/mobile-lint.yml
@@ -56,6 +56,8 @@ jobs:
- run: cargo clippy -p ente_photos_rust --features flutter --all-targets --locked -- -D warnings
working-directory: rust
+ - run: dart format --output=none --set-exit-if-changed .
+
- run: flutter analyze --no-fatal-infos
- name: Run Flutter tests
diff --git a/.github/workflows/mobile-packages-lint.yml b/.github/workflows/mobile-packages-lint.yml
index 07a0554011..386f20c204 100644
--- a/.github/workflows/mobile-packages-lint.yml
+++ b/.github/workflows/mobile-packages-lint.yml
@@ -107,102 +107,102 @@ jobs:
# 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 && flutter analyze --no-fatal-infos
+ 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 && flutter analyze --no-fatal-infos
+ 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 && flutter analyze --no-fatal-infos
+ 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 && flutter analyze --no-fatal-infos
+ 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 && flutter analyze --no-fatal-infos
+ 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 && flutter analyze --no-fatal-infos
+ 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 && flutter analyze --no-fatal-infos
+ 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 && flutter analyze --no-fatal-infos
+ 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 && flutter analyze --no-fatal-infos
+ 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 && flutter analyze --no-fatal-infos
+ 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 - lock_screen
if: needs.detect-changes.outputs.lint_all == 'true' || contains(needs.detect-changes.outputs.packages, 'lock_screen')
- run: flutter pub get --enforce-lockfile && flutter analyze --no-fatal-infos
+ 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 && flutter analyze --no-fatal-infos
+ 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 && flutter analyze --no-fatal-infos
+ 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 && flutter analyze --no-fatal-infos
+ 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 && flutter analyze --no-fatal-infos
+ 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 && flutter analyze --no-fatal-infos
+ 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 && flutter analyze --no-fatal-infos
+ 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 && flutter analyze --no-fatal-infos
+ 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 && flutter analyze --no-fatal-infos
+ 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 && flutter analyze --no-fatal-infos
+ 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:
@@ -247,6 +247,7 @@ jobs:
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
@@ -256,6 +257,7 @@ jobs:
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
@@ -265,6 +267,7 @@ jobs:
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
diff --git a/mobile/apps/photos/lib/ui/tabs/albums/empty_states/empty_state_feature_row.dart b/mobile/apps/photos/lib/ui/tabs/albums/empty_states/empty_state_feature_row.dart
index 8bf822d605..b70dc97db7 100644
--- a/mobile/apps/photos/lib/ui/tabs/albums/empty_states/empty_state_feature_row.dart
+++ b/mobile/apps/photos/lib/ui/tabs/albums/empty_states/empty_state_feature_row.dart
@@ -36,10 +36,7 @@ class EmptyStateFeatureRow extends StatelessWidget {
}
class EmptyStateBulletFeatureRow extends StatelessWidget {
- const EmptyStateBulletFeatureRow({
- required this.label,
- super.key,
- });
+ const EmptyStateBulletFeatureRow({required this.label, super.key});
final String label;