Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing rule severity for a category of analyzer rules + switching some rules from dotnet_diagnostic syntax #106

Merged
merged 5 commits into from Mar 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 7 additions & 24 deletions .editorconfig
Expand Up @@ -12,46 +12,26 @@ indent_style = space
tab_width = 4

# New line preferences
end_of_line = crlf
end_of_line = native
insert_final_newline = false

#### .NET Coding Conventions ####

# Code analyzers
dotnet_analyzer_diagnostic.category-Security.severity = error
dotnet_analyzer_diagnostic.category-Style.severity = error

# Temporary code analysis supressions
# IDE1006: Naming Styles
dotnet_diagnostic.IDE1006.severity = suggestion
# IDE0058: Expression value is never used
dotnet_diagnostic.IDE0058.severity = suggestion
# IDE0004: Remove Unnecessary Cast
dotnet_diagnostic.IDE0004.severity = suggestion
# IDE0059: Unnecessary assignment of a value
dotnet_diagnostic.IDE0059.severity = suggestion
# IDE0072: Add missing cases
dotnet_diagnostic.IDE0072.severity = suggestion
# IDE0010: Add missing cases
dotnet_diagnostic.IDE0010.severity = suggestion
# IDE0300: Simplify collection initialization
dotnet_diagnostic.IDE0300.severity = suggestion
# IDE0302: Simplify collection initialization
dotnet_diagnostic.IDE0302.severity = suggestion
# IDE0028: Simplify collection initialization
dotnet_diagnostic.IDE0028.severity = suggestion
# IDE0072: Add missing cases
dotnet_diagnostic.IDE0072.severity = suggestion
# IDE0240: Remove redundant nullable directive
dotnet_diagnostic.IDE0240.severity = suggestion
# CS1573: Parameter has no matching param tag in the XML comment (but other parameters do)
dotnet_diagnostic.CS1573.severity = suggestion
# CS1591: Missing XML comment for publicly visible type or member
dotnet_diagnostic.CS1591.severity = suggestion
# IDE0003: Remove qualification
dotnet_diagnostic.IDE0003.severity = suggestion
# IDE0250: Make struct 'readonly'
dotnet_diagnostic.IDE0250.severity = none

# temporary security analysis supressions
# Temporary security analysis supressions
# CA5359: Do not disable certificate validation
dotnet_diagnostic.CA5359.severity = suggestion

Expand Down Expand Up @@ -143,6 +123,7 @@ csharp_preserve_single_line_statements = false:none
csharp_prefer_static_local_function = true:suggestion
csharp_prefer_simple_using_statement = false:none
csharp_style_prefer_switch_expression = true:suggestion
csharp_style_prefer_readonly_struct = false:suggestion

# Expression-bodied members
csharp_style_expression_bodied_methods = true:refactoring
Expand Down Expand Up @@ -182,6 +163,8 @@ csharp_style_prefer_utf8_string_literals = true:suggestion
csharp_style_deconstructed_variable_declaration = true:suggestion
csharp_style_prefer_top_level_statements = false:suggestion
csharp_style_prefer_local_over_anonymous_function = true:suggestion
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
csharp_style_unused_value_expression_statement_preference = discard_variable:suggestion

# Space preferences
csharp_space_after_cast = false
Expand Down
2 changes: 1 addition & 1 deletion benchmark/Resp.benchmark/OpType.cs
Expand Up @@ -14,4 +14,4 @@ public enum OpType
READONLY = 8888,
AUTH = 9999,
}
}
}
2 changes: 1 addition & 1 deletion playground/ClusterStress/ClusterOptions.cs
Expand Up @@ -23,4 +23,4 @@ public partial class Options
public int MigrateBatch { get; set; }

}
}
}
2 changes: 1 addition & 1 deletion playground/ClusterStress/Program.cs
Expand Up @@ -78,4 +78,4 @@ static void RunShardedBasicCommandsBenchmark(Options opts)
}
}
}
}
}
2 changes: 1 addition & 1 deletion playground/ClusterStress/ReqGenForCluster.cs
Expand Up @@ -203,4 +203,4 @@ private byte[] GetClusterKeyInterleaved()
}

}
}
}
2 changes: 1 addition & 1 deletion playground/ClusterStress/ReqGenUtilsCluster.cs
Expand Up @@ -411,4 +411,4 @@ private bool WriteKey(ref byte* curr, byte* vend, int key)
return WriteStringBytes(ref curr, vend, keyData);
}
}
}
}