[PR #4488] [MERGED] chore: code cleanup according to unintroduced lints #6269

Closed
opened 2026-03-23 22:22:28 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/4488
Author: @Xazin
Created: 1/24/2024
Status: Merged
Merged: 1/25/2024
Merged by: @LucasXu0

Base: mainHead: chore/code-cleanup-proposals


📝 Commits (10+)

  • d1dde76 chore: remove redundant arguments
  • 3a77df3 chore: remove unused constructor params
  • ddd72ee chore: reorganize constructors
  • 3607886 chore: remove unnecessary awaits in returns
  • 4cb3c95 chore: remove unnecessary paranthesis
  • ceaf787 chore: add lints
  • c4ec42a chore: merge branch 'upstream/main' into chore/code-cleanup-proposals
  • b9f80e0 chore: clean up after merge
  • 2da18a9 chore: add sort constructors first
  • 3a8abf9 chore: organize constructors in blocs

📊 Changes

447 files changed (+3325 additions, -3404 deletions)

View changed files

📝 frontend/appflowy_flutter/analysis_options.yaml (+10 -2)
📝 frontend/appflowy_flutter/integration_test/board_test.dart (+2 -2)
📝 frontend/appflowy_flutter/integration_test/cloud/document_sync_test.dart (+1 -3)
📝 frontend/appflowy_flutter/integration_test/database/database_calendar_test.dart (+2 -2)
📝 frontend/appflowy_flutter/integration_test/database/database_cell_test.dart (+0 -1)
📝 frontend/appflowy_flutter/integration_test/document/document_create_and_delete_test.dart (+2 -2)
📝 frontend/appflowy_flutter/integration_test/document/document_inline_page_reference_test.dart (+0 -2)
📝 frontend/appflowy_flutter/integration_test/document/document_with_database_test.dart (+0 -4)
📝 frontend/appflowy_flutter/integration_test/document/document_with_image_block_test.dart (+0 -4)
📝 frontend/appflowy_flutter/integration_test/document/document_with_inline_math_equation_test.dart (+0 -3)
📝 frontend/appflowy_flutter/integration_test/document/document_with_inline_page_test.dart (+2 -3)
📝 frontend/appflowy_flutter/integration_test/document/document_with_link_test.dart (+1 -4)
📝 frontend/appflowy_flutter/integration_test/document/document_with_outline_block_test.dart (+0 -3)
📝 frontend/appflowy_flutter/integration_test/document/document_with_toggle_list_test.dart (+8 -22)
📝 frontend/appflowy_flutter/integration_test/document/edit_document_test.dart (+2 -9)
📝 frontend/appflowy_flutter/integration_test/empty_document_test.dart (+2 -2)
📝 frontend/appflowy_flutter/integration_test/open_ai_smart_menu_test.dart (+6 -6)
📝 frontend/appflowy_flutter/integration_test/sidebar/sidebar_favorites_test.dart (+1 -13)
📝 frontend/appflowy_flutter/integration_test/sidebar/sidebar_test.dart (+1 -3)
📝 frontend/appflowy_flutter/integration_test/tabs_test.dart (+2 -8)

...and 80 more files

📄 Description

This PR includes a small bunch of commits, that each clean up the code by targeting a specific lint.

The commits relate to:

  • avoid_redundant_argument_values
  • avoid_unused_constructor_parameters
  • sort_constructors_first (Partially / 60-70%)
  • unnecessary_await_in_return
  • unnecessary_parenthesis

I think merging this would cause some conflicts in existing PRs, albeit not really hard to resolve, but we can choose to pick out any commit from here if we don't want to merge the ones that would cause the most damage at the moment. I don't think there will ever be a "prime time" to do this clean up though, as we keep creating more and more PRs.

It is on purpose that I haven't introduced the lints themselves yet.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AppFlowy-IO/AppFlowy/pull/4488 **Author:** [@Xazin](https://github.com/Xazin) **Created:** 1/24/2024 **Status:** ✅ Merged **Merged:** 1/25/2024 **Merged by:** [@LucasXu0](https://github.com/LucasXu0) **Base:** `main` ← **Head:** `chore/code-cleanup-proposals` --- ### 📝 Commits (10+) - [`d1dde76`](https://github.com/AppFlowy-IO/AppFlowy/commit/d1dde7635d12f9dbd994b7709333e896845ebc9a) chore: remove redundant arguments - [`3a77df3`](https://github.com/AppFlowy-IO/AppFlowy/commit/3a77df3e42ab5a86ec631112851bf37f2fca9fec) chore: remove unused constructor params - [`ddd72ee`](https://github.com/AppFlowy-IO/AppFlowy/commit/ddd72ee2e8c73541179c47f09dde20c0e22501f9) chore: reorganize constructors - [`3607886`](https://github.com/AppFlowy-IO/AppFlowy/commit/3607886a4d9de0ae571b98eebab9b0dc302ebd96) chore: remove unnecessary awaits in returns - [`4cb3c95`](https://github.com/AppFlowy-IO/AppFlowy/commit/4cb3c95a63b6ca817beab3f82d4667b3df3e9116) chore: remove unnecessary paranthesis - [`ceaf787`](https://github.com/AppFlowy-IO/AppFlowy/commit/ceaf787c37551e43dc12024718bc875d6f6a8898) chore: add lints - [`c4ec42a`](https://github.com/AppFlowy-IO/AppFlowy/commit/c4ec42a0fc5b8baa914929794d0a74f5ed9af061) chore: merge branch 'upstream/main' into chore/code-cleanup-proposals - [`b9f80e0`](https://github.com/AppFlowy-IO/AppFlowy/commit/b9f80e016dfd4bc87c4d9e2321caeee780872f91) chore: clean up after merge - [`2da18a9`](https://github.com/AppFlowy-IO/AppFlowy/commit/2da18a959de25e927be63bc1d3725a52bbe8789f) chore: add sort constructors first - [`3a8abf9`](https://github.com/AppFlowy-IO/AppFlowy/commit/3a8abf9f980f9cabb49deff94df7ac65fd4b2cb5) chore: organize constructors in blocs ### 📊 Changes **447 files changed** (+3325 additions, -3404 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/analysis_options.yaml` (+10 -2) 📝 `frontend/appflowy_flutter/integration_test/board_test.dart` (+2 -2) 📝 `frontend/appflowy_flutter/integration_test/cloud/document_sync_test.dart` (+1 -3) 📝 `frontend/appflowy_flutter/integration_test/database/database_calendar_test.dart` (+2 -2) 📝 `frontend/appflowy_flutter/integration_test/database/database_cell_test.dart` (+0 -1) 📝 `frontend/appflowy_flutter/integration_test/document/document_create_and_delete_test.dart` (+2 -2) 📝 `frontend/appflowy_flutter/integration_test/document/document_inline_page_reference_test.dart` (+0 -2) 📝 `frontend/appflowy_flutter/integration_test/document/document_with_database_test.dart` (+0 -4) 📝 `frontend/appflowy_flutter/integration_test/document/document_with_image_block_test.dart` (+0 -4) 📝 `frontend/appflowy_flutter/integration_test/document/document_with_inline_math_equation_test.dart` (+0 -3) 📝 `frontend/appflowy_flutter/integration_test/document/document_with_inline_page_test.dart` (+2 -3) 📝 `frontend/appflowy_flutter/integration_test/document/document_with_link_test.dart` (+1 -4) 📝 `frontend/appflowy_flutter/integration_test/document/document_with_outline_block_test.dart` (+0 -3) 📝 `frontend/appflowy_flutter/integration_test/document/document_with_toggle_list_test.dart` (+8 -22) 📝 `frontend/appflowy_flutter/integration_test/document/edit_document_test.dart` (+2 -9) 📝 `frontend/appflowy_flutter/integration_test/empty_document_test.dart` (+2 -2) 📝 `frontend/appflowy_flutter/integration_test/open_ai_smart_menu_test.dart` (+6 -6) 📝 `frontend/appflowy_flutter/integration_test/sidebar/sidebar_favorites_test.dart` (+1 -13) 📝 `frontend/appflowy_flutter/integration_test/sidebar/sidebar_test.dart` (+1 -3) 📝 `frontend/appflowy_flutter/integration_test/tabs_test.dart` (+2 -8) _...and 80 more files_ </details> ### 📄 Description This PR includes a small bunch of commits, that each clean up the code by targeting a specific lint. The commits relate to: - avoid_redundant_argument_values - avoid_unused_constructor_parameters - sort_constructors_first _(Partially / 60-70%)_ - unnecessary_await_in_return - unnecessary_parenthesis I think merging this would cause some conflicts in existing PRs, albeit not really hard to resolve, but we can choose to pick out any commit from here if we don't want to merge the ones that would cause the most damage at the moment. I don't think there will ever be a "prime time" to do this clean up though, as we keep creating more and more PRs. It is on purpose that I haven't introduced the lints themselves yet. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 22:22:28 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#6269
No description provided.