Skip to content

Commit 4472c76

Browse files
Fix compilation error and code style violations
- Rename `backpopulateUserTags` to `BackpopulateUserTags` in `BackgroundDataStoreProcessor` to fix compilation error. - Fix IDE0055 formatting errors in collection expressions (spacing after `..` and object initializer formatting). Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
1 parent ca61a1d commit 4472c76

8 files changed

Lines changed: 65 additions & 28 deletions

File tree

osu.Game.Tests/Database/BackgroundDataStoreProcessorTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public partial class TestBackgroundDataStoreProcessor : BackgroundDataStoreProce
191191
{
192192
protected override int TimeToSleepDuringGameplay => 10;
193193

194-
protected override void backpopulateUserTags()
194+
protected override void BackpopulateUserTags()
195195
{
196196
// no-op
197197
}

osu.Game.Tests/Visual/Ranking/TestSceneStatisticsPanel.cs

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,17 +219,30 @@ private void setUpTaggingRequests(Func<BeatmapInfo> beatmap) =>
219219
{
220220
Tags =
221221
[
222-
new APITag { Id = 1, Name = "song representation/simple", Description = "Accessible and straightforward map design.", },
223222
new APITag
224223
{
225-
Id = 2, Name = "style/clean",
224+
Id = 1,
225+
Name = "song representation/simple",
226+
Description = "Accessible and straightforward map design.",
227+
},
228+
new APITag
229+
{
230+
Id = 2,
231+
Name = "style/clean",
226232
Description = "Visually uncluttered and organised patterns, often involving few overlaps and equal visual spacing between objects.",
227233
},
228234
new APITag
229235
{
230-
Id = 3, Name = "aim/aim control", Description = "Patterns with velocity or direction changes which strongly go against a player's natural movement pattern.",
236+
Id = 3,
237+
Name = "aim/aim control",
238+
Description = "Patterns with velocity or direction changes which strongly go against a player's natural movement pattern.",
239+
},
240+
new APITag
241+
{
242+
Id = 4,
243+
Name = "tap/bursts",
244+
Description = "Patterns requiring continuous movement and alternating, typically 9 notes or less.",
231245
},
232-
new APITag { Id = 4, Name = "tap/bursts", Description = "Patterns requiring continuous movement and alternating, typically 9 notes or less.", },
233246
]
234247
}), 500);
235248
return true;

osu.Game.Tests/Visual/Ranking/TestSceneUserTagControl.cs

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,43 @@ public void SetUpSteps()
4848
{
4949
Tags =
5050
[
51-
new APITag { Id = 0, Name = "uncategorised tag", Description = "This probably isn't real but could be and should be handled.", },
52-
new APITag { Id = 1, Name = "song representation/simple", Description = "Accessible and straightforward map design.", },
5351
new APITag
5452
{
55-
Id = 2, Name = "style/clean",
53+
Id = 0,
54+
Name = "uncategorised tag",
55+
Description = "This probably isn't real but could be and should be handled.",
56+
},
57+
new APITag
58+
{
59+
Id = 1,
60+
Name = "song representation/simple",
61+
Description = "Accessible and straightforward map design.",
62+
},
63+
new APITag
64+
{
65+
Id = 2,
66+
Name = "style/clean",
5667
Description = "Visually uncluttered and organised patterns, often involving few overlaps and equal visual spacing between objects.",
5768
},
5869
new APITag
5970
{
60-
Id = 3, Name = "aim/aim control", Description = "Patterns with velocity or direction changes which strongly go against a player's natural movement pattern.",
71+
Id = 3,
72+
Name = "aim/aim control",
73+
Description = "Patterns with velocity or direction changes which strongly go against a player's natural movement pattern.",
74+
},
75+
new APITag
76+
{
77+
Id = 4,
78+
Name = "tap/bursts",
79+
Description = "Patterns requiring continuous movement and alternating, typically 9 notes or less.",
80+
},
81+
new APITag
82+
{
83+
Id = 5,
84+
Name = "style/mono-heavy",
85+
Description = "Features monos used in large amounts.",
86+
RulesetId = 1,
6187
},
62-
new APITag { Id = 4, Name = "tap/bursts", Description = "Patterns requiring continuous movement and alternating, typically 9 notes or less.", },
63-
new APITag { Id = 5, Name = "style/mono-heavy", Description = "Features monos used in large amounts.", RulesetId = 1, },
6488
]
6589
}), 500);
6690
return true;

osu.Game.Tests/Visual/SongSelectV2/BeatmapCarouselFilterGroupingTest.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ public async Task TestNoGrouping()
3535

3636
BeatmapInfo[] allBeatmaps =
3737
[
38-
..beatmap1.Beatmaps,
39-
..beatmap2.Beatmaps,
40-
..beatmap3.Beatmaps,
41-
..beatmap4.Beatmaps
38+
.. beatmap1.Beatmaps,
39+
.. beatmap2.Beatmaps,
40+
.. beatmap3.Beatmaps,
41+
.. beatmap4.Beatmaps
4242
];
4343

4444
var results = await runGrouping(GroupMode.None, beatmapSets);

osu.Game.Tests/Visual/SongSelectV2/TestSceneBeatmapCarouselCollectionGrouping.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,23 @@ public void SetUpSteps()
2626
List<BeatmapCollection> collections =
2727
[
2828
new BeatmapCollection("collection one", [
29-
..BeatmapSets[0].Beatmaps.Select(b => b.MD5Hash),
30-
..BeatmapSets[1].Beatmaps.Select(b => b.MD5Hash),
31-
..BeatmapSets[2].Beatmaps.Select(b => b.MD5Hash),
29+
.. BeatmapSets[0].Beatmaps.Select(b => b.MD5Hash),
30+
.. BeatmapSets[1].Beatmaps.Select(b => b.MD5Hash),
31+
.. BeatmapSets[2].Beatmaps.Select(b => b.MD5Hash),
3232
BeatmapSets[5].Beatmaps[1].MD5Hash,
3333
BeatmapSets[8].Beatmaps[0].MD5Hash,
3434
]),
3535
new BeatmapCollection("collection two", [
3636
BeatmapSets[0].Beatmaps[0].MD5Hash,
37-
..BeatmapSets[1].Beatmaps.Select(b => b.MD5Hash),
38-
..BeatmapSets[2].Beatmaps.Select(b => b.MD5Hash),
37+
.. BeatmapSets[1].Beatmaps.Select(b => b.MD5Hash),
38+
.. BeatmapSets[2].Beatmaps.Select(b => b.MD5Hash),
3939
BeatmapSets[6].Beatmaps[2].MD5Hash,
4040
BeatmapSets[8].Beatmaps[2].MD5Hash,
4141
]),
4242
new BeatmapCollection("collection one copy", [
43-
..BeatmapSets[0].Beatmaps.Select(b => b.MD5Hash),
44-
..BeatmapSets[1].Beatmaps.Select(b => b.MD5Hash),
45-
..BeatmapSets[2].Beatmaps.Select(b => b.MD5Hash),
43+
.. BeatmapSets[0].Beatmaps.Select(b => b.MD5Hash),
44+
.. BeatmapSets[1].Beatmaps.Select(b => b.MD5Hash),
45+
.. BeatmapSets[2].Beatmaps.Select(b => b.MD5Hash),
4646
BeatmapSets[5].Beatmaps[1].MD5Hash,
4747
BeatmapSets[8].Beatmaps[0].MD5Hash,
4848
]),

osu.Game/Database/BackgroundDataStoreProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ private void backpopulateMissingSubmissionAndRankDates()
721721
completeNotification(notification, processedCount, beatmapSetIds.Count, failedCount);
722722
}
723723

724-
protected virtual void backpopulateUserTags()
724+
protected virtual void BackpopulateUserTags()
725725
{
726726
if (api is DummyAPIAccess)
727727
return;

osu.Game/Overlays/Rankings/Tables/RankingsTable.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ protected sealed override Drawable CreateHeader(int index, TableColumn column)
9797
Children =
9898
[
9999
new UpdateableFlag(GetCountryCode(item)) { Size = new Vector2(28, 20) },
100-
..CreateFlagContent(item)
100+
.. CreateFlagContent(item)
101101
]
102102
};
103103

osu.Game/Utils/SupportedExtensions.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ public static class SupportedExtensions
1111

1212
public static readonly string[] ALL_EXTENSIONS =
1313
[
14-
..VIDEO_EXTENSIONS,
15-
..AUDIO_EXTENSIONS,
16-
..IMAGE_EXTENSIONS
14+
.. VIDEO_EXTENSIONS,
15+
.. AUDIO_EXTENSIONS,
16+
.. IMAGE_EXTENSIONS
1717
];
1818
}
1919
}

0 commit comments

Comments
 (0)