Skip to content

Commit 9498faa

Browse files
chore(cat-voices): change line length to 100 (#2558)
* feat: update analysis_options * fix: ignore lines_longer_than_80_chars * chore: apply formatting
1 parent 9443648 commit 9498faa

File tree

497 files changed

+1761
-3541
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

497 files changed

+1761
-3541
lines changed

.vscode/settings.recommended.json

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,19 @@
99
},
1010
"files.autoSave": "afterDelay",
1111
"editor.formatOnType": true,
12-
"editor.rulers": [100],
12+
"editor.rulers": [
13+
100
14+
],
1315
"editor.tabSize": 4,
1416
"debug.openDebug": "openOnDebugBreak",
1517
"debug.internalConsoleOptions": "openOnSessionStart",
18+
"dart.lineLength": 100,
1619
"[dart]": {
1720
"editor.formatOnSave": true,
1821
"editor.formatOnType": true,
19-
"editor.rulers": [80],
22+
"editor.rulers": [
23+
100
24+
],
2025
"editor.codeActionsOnSave": {
2126
"source.fixAll": "explicit",
2227
"source.organizeImports": "explicit",
@@ -54,8 +59,14 @@
5459
".pages": "yaml",
5560
".earthlyignore": "ignore"
5661
},
57-
"rust-analyzer.linkedProjects": ["./catalyst-gateway/Cargo.toml"],
58-
"rust-analyzer.check.overrideCommand": ["bash", "-c", "cargo lint-vscode"],
62+
"rust-analyzer.linkedProjects": [
63+
"./catalyst-gateway/Cargo.toml"
64+
],
65+
"rust-analyzer.check.overrideCommand": [
66+
"bash",
67+
"-c",
68+
"cargo lint-vscode"
69+
],
5970
"yaml.schemas": {
6071
"https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yml"
6172
},
@@ -83,7 +94,9 @@
8394
"files.trimTrailingWhitespace": true,
8495
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint"
8596
},
86-
"rust-analyzer.rustfmt.extraArgs": ["+nightly"],
97+
"rust-analyzer.rustfmt.extraArgs": [
98+
"+nightly"
99+
],
87100
"rust-analyzer.lens.enable": true,
88101
"vs-kubernetes": {
89102
"vs-kubernetes.kubeconfig": "utilities/local-cluster/shared/k3s.yaml"
@@ -94,4 +107,4 @@
94107
"languageToolLinter.external.url": "https://api.languagetoolplus.com",
95108
"languageToolLinter.languageTool.language": "en-US",
96109
"languageToolLinter.languageTool.motherTongue": "en-US"
97-
}
110+
}

catalyst_voices/apps/voices/integration_test/pageobject/app_bar_page.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ class AppBarPage {
1515
final lockBtn = const Key('LockButton');
1616
final unlockBtn = const Key('UnlockButton');
1717
final visitorBtn = const Key('VisitorBtn');
18-
final sessionAccountPopupMenuAvatar =
19-
const Key('SessionAccountPopupMenuAvatar');
18+
final sessionAccountPopupMenuAvatar = const Key('SessionAccountPopupMenuAvatar');
2019

2120
Future<void> spacesDrawerButtonExists({bool? reverse = false}) async {
2221
expect($(spacesDrawerButton).exists, !reverse!);

catalyst_voices/apps/voices/integration_test/pageobject/discovery/campaign_categories_section.dart

Lines changed: 8 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,7 @@ class CampaignCategoriesSection {
3434
try {
3535
$(categoriesRoot).$(campaignCategories).at(i).$(description).visible;
3636
} catch (e) {
37-
await $(categoriesRoot)
38-
.$(campaignCategories)
39-
.at(i)
40-
.$(description)
41-
.scrollTo();
37+
await $(categoriesRoot).$(campaignCategories).at(i).$(description).scrollTo();
4238
}
4339
expect(
4440
$(categoriesRoot).$(campaignCategories).at(i).$(title).$(Text).text,
@@ -49,66 +45,31 @@ class CampaignCategoriesSection {
4945
isNotEmpty,
5046
);
5147
expect(
52-
$(categoriesRoot)
53-
.$(campaignCategories)
54-
.at(i)
55-
.$(availableFunds)
56-
.$(dataTitle)
57-
.text,
48+
$(categoriesRoot).$(campaignCategories).at(i).$(availableFunds).$(dataTitle).text,
5849
(await t()).fundsAvailable,
5950
);
6051
expect(
61-
$(categoriesRoot)
62-
.$(campaignCategories)
63-
.at(i)
64-
.$(availableFunds)
65-
.$(dataValue)
66-
.text,
52+
$(categoriesRoot).$(campaignCategories).at(i).$(availableFunds).$(dataValue).text,
6753
isNotEmpty,
6854
);
6955
expect(
70-
$(categoriesRoot)
71-
.$(campaignCategories)
72-
.at(i)
73-
.$(proposalsCount)
74-
.$(dataTitle)
75-
.text,
56+
$(categoriesRoot).$(campaignCategories).at(i).$(proposalsCount).$(dataTitle).text,
7657
(await t()).proposals,
7758
);
7859
expect(
79-
$(categoriesRoot)
80-
.$(campaignCategories)
81-
.at(i)
82-
.$(proposalsCount)
83-
.$(dataValue)
84-
.text,
60+
$(categoriesRoot).$(campaignCategories).at(i).$(proposalsCount).$(dataValue).text,
8561
isNotEmpty,
8662
);
8763
expect(
88-
$(categoriesRoot)
89-
.$(campaignCategories)
90-
.at(i)
91-
.$(description)
92-
.$(Text)
93-
.text,
64+
$(categoriesRoot).$(campaignCategories).at(i).$(description).$(Text).text,
9465
isNotEmpty,
9566
);
9667
expect(
97-
$(categoriesRoot)
98-
.$(campaignCategories)
99-
.at(i)
100-
.$(categoryDetailsButton)
101-
.$(Text)
102-
.text,
68+
$(categoriesRoot).$(campaignCategories).at(i).$(categoryDetailsButton).$(Text).text,
10369
(await t()).categoryDetails,
10470
);
10571
expect(
106-
$(categoriesRoot)
107-
.$(campaignCategories)
108-
.at(i)
109-
.$(viewProposalsButton)
110-
.$(Text)
111-
.text,
72+
$(categoriesRoot).$(campaignCategories).at(i).$(viewProposalsButton).$(Text).text,
11273
(await t()).viewProposals,
11374
);
11475
}

catalyst_voices/apps/voices/integration_test/pageobject/discovery/current_campaign_selector_page.dart

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,8 @@ class CurrentCampaignSection {
8989
$(currentCampaignRoot).$(ideaDescription).$(MarkdownBody),
9090
)
9191
.data;
92-
final textToMatch = (await t())
93-
.ideaJourneyDescription
94-
.split('#### ')[1]
95-
.split('[fund timeline]')[0];
92+
final textToMatch =
93+
(await t()).ideaJourneyDescription.split('#### ')[1].split('[fund timeline]')[0];
9694
expect(descriptionText.indexOf(textToMatch), greaterThanOrEqualTo(1));
9795
expect($(currentCampaignRoot).$(timelineCard), findsExactly(5));
9896
}
@@ -108,27 +106,16 @@ class CurrentCampaignSection {
108106
Future<void> timelineCardsDataIsRendered() async {
109107
await descriptionIsRenderedCorrectly();
110108
await DiscoveryPage($).loadRetryOnError(currentCampaignLoadingError);
111-
await $(currentCampaignRoot)
112-
.$(timelineCard)
113-
.at(0)
114-
.$(timelineCardDate)
115-
.scrollTo(step: 150);
109+
await $(currentCampaignRoot).$(timelineCard).at(0).$(timelineCardDate).scrollTo(step: 150);
116110
for (var i = 0; i < 5; i++) {
117-
final cardTitle = $(campaignTimelineComponent)
118-
.$(timelineCard)
119-
.at(i)
120-
.$(timelineCardTitle);
111+
final cardTitle = $(campaignTimelineComponent).$(timelineCard).at(i).$(timelineCardTitle);
121112
await $.tester.dragUntilVisible(
122113
cardTitle,
123114
$(campaignTimelineComponent).$(SingleChildScrollView),
124115
const Offset(10, 0),
125116
);
126117
expect(
127-
$(currentCampaignRoot)
128-
.$(timelineCard)
129-
.at(i)
130-
.$(AnimatedSwitcher)
131-
.$(Text),
118+
$(currentCampaignRoot).$(timelineCard).at(i).$(AnimatedSwitcher).$(Text),
132119
findsNothing,
133120
);
134121
await $(currentCampaignRoot).$(timelineCard).at(i).tap();
@@ -141,12 +128,7 @@ class CurrentCampaignSection {
141128
isNotEmpty,
142129
);
143130
expect(
144-
$(currentCampaignRoot)
145-
.$(timelineCard)
146-
.at(i)
147-
.$(AnimatedSwitcher)
148-
.$(Text)
149-
.text,
131+
$(currentCampaignRoot).$(timelineCard).at(i).$(AnimatedSwitcher).$(Text).text,
150132
isNotEmpty,
151133
);
152134
}

catalyst_voices/apps/voices/integration_test/pageobject/discovery/most_recent_section.dart

Lines changed: 8 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@ class MostRecentSection {
3737
}
3838

3939
Future<void> recentProposalsAreRenderedCorrectly() async {
40-
await $(mostRecentProposals)
41-
.$(proposalCard)
42-
.at(0)
43-
.$(commentsCount)
44-
.scrollTo(step: 90);
40+
await $(mostRecentProposals).$(proposalCard).at(0).$(commentsCount).scrollTo(step: 90);
4541

4642
// TODO(oldgreg): there are only 3 cards indexed(rendered) always,need to
4743
// find a way to check cards past 3rd after horizontal scroll
@@ -84,52 +80,27 @@ class MostRecentSection {
8480
findsOneWidget,
8581
);
8682
expect(
87-
$(parentContainer)
88-
.$(proposalCard)
89-
.at(cardIndex)
90-
.$(authorAvatar)
91-
.$(Text)
92-
.text,
83+
$(parentContainer).$(proposalCard).at(cardIndex).$(authorAvatar).$(Text).text,
9384
isNotEmpty,
9485
);
9586
expect(
9687
$(parentContainer).$(proposalCard).at(cardIndex).$(author).text,
9788
isNotEmpty,
9889
);
9990
expect(
100-
$(parentContainer)
101-
.$(proposalCard)
102-
.at(cardIndex)
103-
.$(fundsRequested)
104-
.$(title)
105-
.text,
91+
$(parentContainer).$(proposalCard).at(cardIndex).$(fundsRequested).$(title).text,
10692
(await t()).fundsRequested,
10793
);
10894
expect(
109-
$(parentContainer)
110-
.$(proposalCard)
111-
.at(cardIndex)
112-
.$(fundsRequested)
113-
.$(value)
114-
.text,
95+
$(parentContainer).$(proposalCard).at(cardIndex).$(fundsRequested).$(value).text,
11596
isNotEmpty,
11697
);
11798
expect(
118-
$(parentContainer)
119-
.$(proposalCard)
120-
.at(cardIndex)
121-
.$(duration)
122-
.$(title)
123-
.text,
99+
$(parentContainer).$(proposalCard).at(cardIndex).$(duration).$(title).text,
124100
(await t()).duration,
125101
);
126102
expect(
127-
$(parentContainer)
128-
.$(proposalCard)
129-
.at(cardIndex)
130-
.$(duration)
131-
.$(value)
132-
.text,
103+
$(parentContainer).$(proposalCard).at(cardIndex).$(duration).$(value).text,
133104
isNotEmpty,
134105
);
135106
expect(
@@ -145,11 +116,7 @@ class MostRecentSection {
145116
isNotEmpty,
146117
);
147118
expect(
148-
$(parentContainer)
149-
.$(proposalCard)
150-
.at(cardIndex)
151-
.$(timezoneDateTimeText)
152-
.text,
119+
$(parentContainer).$(proposalCard).at(cardIndex).$(timezoneDateTimeText).text,
153120
isNotEmpty,
154121
);
155122
expect(
@@ -160,9 +127,7 @@ class MostRecentSection {
160127

161128
Future<void> tryToScrollToRetryError() async {
162129
try {
163-
await $(mostRecentLoadingError)
164-
.$(#ErrorRetryBtn)
165-
.scrollTo(step: 300, maxScrolls: 5);
130+
await $(mostRecentLoadingError).$(#ErrorRetryBtn).scrollTo(step: 300, maxScrolls: 5);
166131
} catch (e) {
167132
return;
168133
}

catalyst_voices/apps/voices/integration_test/pageobject/onboarding/create_flow/step_11_seedphrase_success.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ class SeedphraseSuccessPanel extends OnboardingPageBase {
4949
find.byWidgetPredicate(
5050
(widget) =>
5151
widget is CatalystSvgPicture &&
52-
(widget.bytesLoader as dynamic).assetName ==
53-
'assets/icons/check.svg',
52+
(widget.bytesLoader as dynamic).assetName == 'assets/icons/check.svg',
5453
),
5554
findsOneWidget,
5655
);

catalyst_voices/apps/voices/integration_test/pageobject/onboarding/create_flow/step_12_password_info.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ class PasswordInfoPanel extends OnboardingPageBase {
4444
find.byWidgetPredicate(
4545
(widget) =>
4646
widget is CatalystSvgPicture &&
47-
(widget.bytesLoader as dynamic).assetName ==
48-
'assets/icons/lock-closed.svg',
47+
(widget.bytesLoader as dynamic).assetName == 'assets/icons/lock-closed.svg',
4948
),
5049
findsOneWidget,
5150
);

catalyst_voices/apps/voices/integration_test/pageobject/onboarding/create_flow/step_13_password_input.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ class PasswordInputPanel extends OnboardingPageBase {
4343
bool isShown = true,
4444
}) async {
4545
final passwordConfirmField = $(passwordConfirmInputField);
46-
final widget =
47-
$.tester.widget<VoicesPasswordTextField>(passwordConfirmField);
46+
final widget = $.tester.widget<VoicesPasswordTextField>(passwordConfirmField);
4847
final decoration = widget.decoration!;
4948
if (!isShown) {
5049
expect(decoration.errorText, null);
@@ -91,8 +90,7 @@ class PasswordInputPanel extends OnboardingPageBase {
9190
find.byWidgetPredicate(
9291
(widget) =>
9392
widget is CatalystSvgPicture &&
94-
(widget.bytesLoader as dynamic).assetName ==
95-
'assets/icons/lock-closed.svg',
93+
(widget.bytesLoader as dynamic).assetName == 'assets/icons/lock-closed.svg',
9694
),
9795
findsOneWidget,
9896
);

catalyst_voices/apps/voices/integration_test/pageobject/onboarding/create_flow/step_14_keychain_final.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,15 @@ class KeychainFinalPanel extends OnboardingPageBase {
6666
find.byWidgetPredicate(
6767
(widget) =>
6868
widget is CatalystSvgPicture &&
69-
(widget.bytesLoader as dynamic).assetName ==
70-
'assets/images/keychain.svg',
69+
(widget.bytesLoader as dynamic).assetName == 'assets/images/keychain.svg',
7170
),
7271
findsOneWidget,
7372
);
7473
expect(
7574
find.byWidgetPredicate(
7675
(widget) =>
7776
widget is CatalystSvgPicture &&
78-
(widget.bytesLoader as dynamic).assetName ==
79-
'assets/icons/lock-closed.svg',
77+
(widget.bytesLoader as dynamic).assetName == 'assets/icons/lock-closed.svg',
8078
),
8179
findsOneWidget,
8280
);

catalyst_voices/apps/voices/integration_test/pageobject/onboarding/create_flow/step_15_link_wallet_info.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ class LinkWalletInfoPanel extends OnboardingPageBase {
5454
find.byWidgetPredicate(
5555
(widget) =>
5656
widget is CatalystSvgPicture &&
57-
(widget.bytesLoader as dynamic).assetName ==
58-
'assets/images/keychain.svg',
57+
(widget.bytesLoader as dynamic).assetName == 'assets/images/keychain.svg',
5958
),
6059
findsOneWidget,
6160
);

0 commit comments

Comments
 (0)