Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@ insert_final_newline = true
dotnet_separate_import_directive_groups = false
dotnet_sort_system_directives_first = true
file_header_template = unset
dotnet_diagnostic.SA1633.severity = silent # A C# code file is missing a standard file header. https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1633.md

# this. and Me. preferences
dotnet_style_qualification_for_event = false:silent
dotnet_style_qualification_for_field = false:silent
dotnet_style_qualification_for_method = false:silent
dotnet_style_qualification_for_property = false:silent
dotnet_diagnostic.SA1101.severity = silent # SA1101: Prefix local calls with this

# Language keywords vs BCL types preferences
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
Expand Down Expand Up @@ -84,6 +86,10 @@ dotnet_code_quality_unused_parameters = all:suggestion
# Suppression preferences
dotnet_remove_unnecessary_suppression_exclusions = none

# XMLDocs preferences
# SA1600: Elements should be documented. We disable this it requires xmldocs for _all_ members. CS1591 already covers documenting public members.
dotnet_diagnostic.SA1600.severity = silent

#### C# Coding Conventions ####
[*.cs]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ public static IEnumerable<object[]> TestData()
{
return new object[][]
{
// TODO: .As<BaseSampleClass> and .As<SampleClass> feels redundant
["""new Mock<BaseSampleClass>().As<{|Moq1300:BaseSampleClass|}>();"""],
["""new Mock<BaseSampleClass>().As<{|Moq1300:SampleClass|}>();"""],
["""new Mock<SampleClass>().As<ISampleInterface>();"""],
// TODO: Testing with .Setup() and .Returns() seems unnecessary.
["""new Mock<SampleClass>().As<ISampleInterface>().Setup(x => x.Calculate(It.IsAny<int>(), It.IsAny<int>())).Returns(10);"""],
}.WithNamespaces().WithReferenceAssemblyGroups();
}
Expand Down
4 changes: 0 additions & 4 deletions Source/Moq.Analyzers.Test/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,4 @@
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.

[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1633:File must have header", Justification = "Not required")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1652:Enable XML documentation output", Justification = "Not required")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.LayoutRules", "SA1503:Braces must not be omitted", Justification = "Not required")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1101:Prefix local calls with this", Justification = "Not required")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:Elements should be documented", Justification = "Not required")]
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
get { return ImmutableArray.Create(Rule); }
}

/// <inheritdoc />
public override void Initialize(AnalysisContext context)
{
context.EnableConcurrentExecution();
Expand Down
4 changes: 0 additions & 4 deletions Source/Moq.Analyzers/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,4 @@
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.

[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1633:File must have header", Justification = "Not required")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1652:Enable XML documentation output", Justification = "Not required")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.LayoutRules", "SA1503:Braces must not be omitted", Justification = "Not required")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1101:Prefix local calls with this", Justification = "Not required")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:Elements should be documented", Justification = "Not required")]