Skip to content

Commit

Permalink
Turn off CA1507
Browse files Browse the repository at this point in the history
  • Loading branch information
huoyaoyuan committed Dec 2, 2024
1 parent 68f2170 commit 68f4fa5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .globalconfig
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ dotnet_diagnostic.IDE1006.severity = warning
# Too many noisy warnings for parsing/formatting numbers
dotnet_diagnostic.CA1305.severity = none

# CA1507: Use nameof to express symbol names
# Flaggs serialization name attributes
dotnet_diagnostic.CA1507.severity = suggestion

# CA1806: Do not ignore method results
# The usages for numeric parsing are explicitly optional
dotnet_diagnostic.CA1806.severity = suggestion
Expand Down
2 changes: 0 additions & 2 deletions osu.Game/Online/API/Requests/Responses/APIKudosuHistory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ public class KudosuGiver

public KudosuAction Action;

#pragma warning disable CA1507 // Happens to name the same because of casing preference
[JsonProperty("action")]
#pragma warning restore CA1507
private string action
{
set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ public class APIUserMostPlayedBeatmap
[JsonProperty("count")]
public int PlayCount { get; set; }

#pragma warning disable CA1507 // Happens to name the same because of casing preference
[JsonProperty("beatmap")]
#pragma warning restore CA1507
private APIBeatmap beatmap { get; set; }

public APIBeatmap BeatmapInfo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ public class NewChatMessageData
[JsonProperty(@"messages")]
public List<Message> Messages { get; set; } = null!;

#pragma warning disable CA1507 // Happens to name the same because of casing preference
[JsonProperty(@"users")]
#pragma warning restore CA1507
private List<APIUser> users { get; set; } = null!;

[OnDeserialized]
Expand Down

0 comments on commit 68f4fa5

Please sign in to comment.