1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-05 09:42:54 +08:00

Enable recommended rules for maintainability

This commit is contained in:
Huo Yaoyuan 2024-11-28 19:55:03 +08:00
parent cd9b5927eb
commit 13d7c6a2d8
5 changed files with 9 additions and 4 deletions

View File

@ -25,6 +25,8 @@
<AnalysisModeDocumentation>Recommended</AnalysisModeDocumentation>
<AnalysisModeGlobalization>Recommended</AnalysisModeGlobalization>
<AnalysisModeInteroperability>Recommended</AnalysisModeInteroperability>
<AnalysisModeMaintainability>Recommended</AnalysisModeMaintainability>
<AnalysisModeNaming>Default</AnalysisModeNaming>
</PropertyGroup>
<PropertyGroup Label="Documentation">
<GenerateDocumentationFile>true</GenerateDocumentationFile>

View File

@ -45,7 +45,9 @@ namespace osu.Game.Online.API.Requests.Responses
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

View File

@ -15,7 +15,9 @@ namespace osu.Game.Online.API.Requests.Responses
[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

View File

@ -19,7 +19,9 @@ namespace osu.Game.Online.Notifications.WebSocket.Events
[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]

View File

@ -666,10 +666,7 @@ namespace osu.Game.Utils
{
// 2020-10-07 jbialogrodzki #730 Since this is public API we should probably
// handle null arguments? It doesn't seem to have been done consistently in this class though.
if (coefficients == null)
{
throw new ArgumentNullException(nameof(coefficients));
}
ArgumentNullException.ThrowIfNull(coefficients);
// 2020-10-07 jbialogrodzki #730 Zero polynomials need explicit handling.
// Without this check, we attempted to peek coefficients at negative indices!