mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 05:22:54 +08:00
Use readonly field when not reflected.
This commit is contained in:
parent
ca52d09e81
commit
205eda8566
@ -158,6 +158,7 @@ csharp_style_throw_expression = true:silent
|
||||
csharp_style_conditional_delegate_call = true:suggestion
|
||||
|
||||
#Style - unused
|
||||
dotnet_style_readonly_field = true:silent
|
||||
dotnet_code_quality_unused_parameters = non_public:silent
|
||||
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
|
||||
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
|
||||
@ -175,8 +176,6 @@ dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent
|
||||
#Supressing roslyn built-in analyzers
|
||||
# Suppress: EC112
|
||||
|
||||
#Field can be readonly
|
||||
dotnet_diagnostic.IDE0044.severity = silent
|
||||
#Private method is unused
|
||||
dotnet_diagnostic.IDE0051.severity = silent
|
||||
#Private member is unused
|
||||
|
@ -87,7 +87,7 @@ namespace osu.Game.Tests.NonVisual.Filtering
|
||||
Assert.IsNull(filterCriteria.BPM.Max);
|
||||
}
|
||||
|
||||
private static object[] lengthQueryExamples =
|
||||
private static readonly object[] length_query_examples =
|
||||
{
|
||||
new object[] { "6ms", TimeSpan.FromMilliseconds(6), TimeSpan.FromMilliseconds(1) },
|
||||
new object[] { "23s", TimeSpan.FromSeconds(23), TimeSpan.FromSeconds(1) },
|
||||
@ -97,7 +97,7 @@ namespace osu.Game.Tests.NonVisual.Filtering
|
||||
};
|
||||
|
||||
[Test]
|
||||
[TestCaseSource(nameof(lengthQueryExamples))]
|
||||
[TestCaseSource(nameof(length_query_examples))]
|
||||
public void TestApplyLengthQueries(string lengthQuery, TimeSpan expectedLength, TimeSpan scale)
|
||||
{
|
||||
string query = $"length={lengthQuery} time";
|
||||
|
Loading…
Reference in New Issue
Block a user