Skip to content

Commit bab3acf

Browse files
Bart KoelmanBart Koelman
authored andcommitted
Updated formatting settings for Resharper 2017.1.1
1 parent 095b758 commit bab3acf

File tree

63 files changed

+330
-342
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+330
-342
lines changed

src/CSharpGuidelinesAnalyzer.sln.DotSettings

Lines changed: 79 additions & 34 deletions
Large diffs are not rendered by default.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
2-
<s:String x:Key="/Default/CodeEditing/Localization/Localizable/@EntryValue">No</s:String>
32
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/KEEP_USER_LINEBREAKS/@EntryValue">True</s:Boolean>
43
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
54
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
6-
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
5+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean>
6+
</wpf:ResourceDictionary>

src/CSharpGuidelinesAnalyzer/CSharpGuidelinesAnalyzer.Test/RoslynTestFramework/AnalysisTestFixture.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ private IList<Diagnostic> GetSortedAnalyzerDiagnostics([NotNull] AnalyzerTestCon
5555
{
5656
IEnumerable<Diagnostic> diagnostics =
5757
EnumerateDiagnosticsForDocument(documentWithSpans.Document, context.ValidationMode,
58-
context.DiagnosticsCaptureMode)
59-
.Where(d => d.Id == DiagnosticId);
58+
context.DiagnosticsCaptureMode).Where(d => d.Id == DiagnosticId);
6059

6160
if (context.DiagnosticsCaptureMode == DiagnosticsCaptureMode.RequireInSourceTree)
6261
{

src/CSharpGuidelinesAnalyzer/CSharpGuidelinesAnalyzer.Test/RoslynTestFramework/AnalyzerTestContext.cs

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,9 @@ public sealed class AnalyzerTestContext
5252

5353
#pragma warning disable AV1561 // Method or constructor contains more than three parameters
5454
#pragma warning disable AV1500 // Member contains more than seven statements
55-
private AnalyzerTestContext([NotNull] string markupCode, [NotNull] string languageName,
56-
[NotNull] string fileName, [NotNull] string assemblyName,
57-
[NotNull] [ItemNotNull] ImmutableHashSet<MetadataReference> references, DocumentationMode documentationMode,
58-
[CanBeNull] int? compilerWarningLevel, TestValidationMode validationMode,
55+
private AnalyzerTestContext([NotNull] string markupCode, [NotNull] string languageName, [NotNull] string fileName,
56+
[NotNull] string assemblyName, [NotNull] [ItemNotNull] ImmutableHashSet<MetadataReference> references,
57+
DocumentationMode documentationMode, [CanBeNull] int? compilerWarningLevel, TestValidationMode validationMode,
5958
DiagnosticsCaptureMode diagnosticsCaptureMode)
6059
{
6160
MarkupCode = markupCode;
@@ -72,9 +71,8 @@ private AnalyzerTestContext([NotNull] string markupCode, [NotNull] string langua
7271
#pragma warning restore AV1561 // Method or constructor contains more than three parameters
7372

7473
public AnalyzerTestContext([NotNull] string markupCode, [NotNull] string languageName)
75-
: this(
76-
markupCode, languageName, DefaultFileName, DefaultAssemblyName, DefaultReferences,
77-
DefaultDocumentationMode, null, DefaultTestValidationMode, DiagnosticsCaptureMode.RequireInSourceTree)
74+
: this(markupCode, languageName, DefaultFileName, DefaultAssemblyName, DefaultReferences, DefaultDocumentationMode,
75+
null, DefaultTestValidationMode, DiagnosticsCaptureMode.RequireInSourceTree)
7876
{
7977
Guard.NotNull(markupCode, nameof(markupCode));
8078
Guard.NotNullNorWhiteSpace(languageName, nameof(languageName));
@@ -85,24 +83,24 @@ public AnalyzerTestContext WithMarkupCode([NotNull] string markupCode)
8583
{
8684
Guard.NotNull(markupCode, nameof(markupCode));
8785

88-
return new AnalyzerTestContext(markupCode, LanguageName, FileName, AssemblyName, References,
89-
DocumentationMode, CompilerWarningLevel, ValidationMode, DiagnosticsCaptureMode);
86+
return new AnalyzerTestContext(markupCode, LanguageName, FileName, AssemblyName, References, DocumentationMode,
87+
CompilerWarningLevel, ValidationMode, DiagnosticsCaptureMode);
9088
}
9189

9290
[NotNull]
9391
public AnalyzerTestContext InFileNamed([NotNull] string fileName)
9492
{
9593
Guard.NotNullNorWhiteSpace(fileName, nameof(fileName));
9694

97-
return new AnalyzerTestContext(MarkupCode, LanguageName, fileName, AssemblyName, References,
98-
DocumentationMode, CompilerWarningLevel, ValidationMode, DiagnosticsCaptureMode);
95+
return new AnalyzerTestContext(MarkupCode, LanguageName, fileName, AssemblyName, References, DocumentationMode,
96+
CompilerWarningLevel, ValidationMode, DiagnosticsCaptureMode);
9997
}
10098

10199
[NotNull]
102100
public AnalyzerTestContext InAssemblyNamed([NotNull] string assemblyName)
103101
{
104-
return new AnalyzerTestContext(MarkupCode, LanguageName, FileName, assemblyName, References,
105-
DocumentationMode, CompilerWarningLevel, ValidationMode, DiagnosticsCaptureMode);
102+
return new AnalyzerTestContext(MarkupCode, LanguageName, FileName, assemblyName, References, DocumentationMode,
103+
CompilerWarningLevel, ValidationMode, DiagnosticsCaptureMode);
106104
}
107105

108106
[NotNull]
@@ -112,9 +110,8 @@ public AnalyzerTestContext WithReferences([NotNull] [ItemNotNull] IEnumerable<Me
112110

113111
ImmutableList<MetadataReference> referenceList = ImmutableList.CreateRange(references);
114112

115-
return new AnalyzerTestContext(MarkupCode, LanguageName, FileName, AssemblyName,
116-
referenceList.ToImmutableHashSet(), DocumentationMode, CompilerWarningLevel, ValidationMode,
117-
DiagnosticsCaptureMode);
113+
return new AnalyzerTestContext(MarkupCode, LanguageName, FileName, AssemblyName, referenceList.ToImmutableHashSet(),
114+
DocumentationMode, CompilerWarningLevel, ValidationMode, DiagnosticsCaptureMode);
118115
}
119116

120117
[NotNull]
@@ -127,22 +124,22 @@ public AnalyzerTestContext WithDocumentationMode(DocumentationMode mode)
127124
[NotNull]
128125
public AnalyzerTestContext CompileAtWarningLevel(int warningLevel)
129126
{
130-
return new AnalyzerTestContext(MarkupCode, LanguageName, FileName, AssemblyName, References,
131-
DocumentationMode, warningLevel, ValidationMode, DiagnosticsCaptureMode);
127+
return new AnalyzerTestContext(MarkupCode, LanguageName, FileName, AssemblyName, References, DocumentationMode,
128+
warningLevel, ValidationMode, DiagnosticsCaptureMode);
132129
}
133130

134131
[NotNull]
135132
public AnalyzerTestContext InValidationMode(TestValidationMode validationMode)
136133
{
137-
return new AnalyzerTestContext(MarkupCode, LanguageName, FileName, AssemblyName, References,
138-
DocumentationMode, CompilerWarningLevel, validationMode, DiagnosticsCaptureMode);
134+
return new AnalyzerTestContext(MarkupCode, LanguageName, FileName, AssemblyName, References, DocumentationMode,
135+
CompilerWarningLevel, validationMode, DiagnosticsCaptureMode);
139136
}
140137

141138
[NotNull]
142139
public AnalyzerTestContext AllowingDiagnosticsOutsideSourceTree()
143140
{
144-
return new AnalyzerTestContext(MarkupCode, LanguageName, FileName, AssemblyName, References,
145-
DocumentationMode, CompilerWarningLevel, ValidationMode, DiagnosticsCaptureMode.AllowOutsideSourceTree);
141+
return new AnalyzerTestContext(MarkupCode, LanguageName, FileName, AssemblyName, References, DocumentationMode,
142+
CompilerWarningLevel, ValidationMode, DiagnosticsCaptureMode.AllowOutsideSourceTree);
146143
}
147144
}
148145
}

src/CSharpGuidelinesAnalyzer/CSharpGuidelinesAnalyzer.Test/RoslynTestFramework/DocumentFactory.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ public DocumentWithSpans GetDocumentWithSpansFromMarkup([NotNull] AnalyzerTestCo
4343
CodeWithSpans codeWithSpans = parser.Parse();
4444

4545
ParseOptions parseOptions = GetParseOptions(context.DocumentationMode, context.LanguageName);
46-
CompilationOptions compilationOptions = GetCompilationOptions(context.CompilerWarningLevel,
47-
context.LanguageName);
46+
CompilationOptions compilationOptions = GetCompilationOptions(context.CompilerWarningLevel, context.LanguageName);
4847

4948
Document document = new AdhocWorkspace()
5049
.AddProject(context.AssemblyName, context.LanguageName)
@@ -64,7 +63,7 @@ private ParseOptions GetParseOptions(DocumentationMode documentationMode, [NotNu
6463
#pragma warning restore AV2310 // Code blocks should not contain inline comments
6564

6665
ParseOptions optionsWithLostFeatures = languageName == LanguageNames.VisualBasic
67-
? (ParseOptions) DefaultBasicParseOptions.WithDocumentationMode(documentationMode)
66+
? (ParseOptions)DefaultBasicParseOptions.WithDocumentationMode(documentationMode)
6867
: DefaultCSharpParseOptions.WithDocumentationMode(documentationMode);
6968

7069
return optionsWithLostFeatures.WithFeatures(OperationFeature);
@@ -241,8 +240,7 @@ private void LocateNextSpanEnd()
241240

242241
private void AppendCodeBlockBetweenSpans()
243242
{
244-
parser.AppendCodeBlock(spanStartIndex + SpanTextLength,
245-
spanEndIndex - spanStartIndex - SpanTextLength);
243+
parser.AppendCodeBlock(spanStartIndex + SpanTextLength, spanEndIndex - spanStartIndex - SpanTextLength);
246244
}
247245

248246
private void AppendTextSpan()

src/CSharpGuidelinesAnalyzer/CSharpGuidelinesAnalyzer.Test/Specs/ClassDesign/AvoidStaticClassesSpecs.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,7 @@ static class SomeExtensions
126126
}
127127

128128
[Fact]
129-
internal void
130-
When_static_class_has_internal_nonextension_method_and_name_ends_with_Extensions_it_must_be_reported
131-
()
129+
internal void When_static_class_has_internal_nonextension_method_and_name_ends_with_Extensions_it_must_be_reported()
132130
{
133131
// Arrange
134132
ParsedSourceCode source = new TypeSourceCodeBuilder()

src/CSharpGuidelinesAnalyzer/CSharpGuidelinesAnalyzer.Test/Specs/Documentation/AvoidToDoCommentsSpecs.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ internal void When_source_contains_documentation_comment_with_space_it_must_be_r
111111
}
112112

113113
[Fact]
114-
public void
115-
When_source_contains_preprocessor_directive_with_single_line_todo_comment_with_space_it_must_be_reported()
114+
internal void When_source_contains_preprocessor_directive_with_single_line_todo_comment_with_space_it_must_be_reported()
116115
{
117116
// Arrange
118117
ParsedSourceCode source = new TypeSourceCodeBuilder()
@@ -128,8 +127,7 @@ public void
128127
}
129128

130129
[Fact]
131-
public void
132-
When_source_contains_preprocessor_directive_with_documentation_comment_with_space_it_must_be_reported()
130+
internal void When_source_contains_preprocessor_directive_with_documentation_comment_with_space_it_must_be_reported()
133131
{
134132
// Arrange
135133
ParsedSourceCode source = new TypeSourceCodeBuilder()
@@ -160,8 +158,7 @@ internal void When_source_contains_region_directive_with_single_line_todo_commen
160158
}
161159

162160
[Fact]
163-
public void
164-
When_source_contains_end_region_directive_with_single_line_todo_comment_with_space_it_must_be_reported()
161+
internal void When_source_contains_end_region_directive_with_single_line_todo_comment_with_space_it_must_be_reported()
165162
{
166163
// Arrange
167164
ParsedSourceCode source = new TypeSourceCodeBuilder()

src/CSharpGuidelinesAnalyzer/CSharpGuidelinesAnalyzer.Test/Specs/Framework/OnlyUseDynamicForUnknownTypesSpecs.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@ void M(object p)
4646
}
4747

4848
[Fact]
49-
public void
50-
When_declared_variable_of_type_dynamic_is_assigned_to_implicitly_cast_string_constant_it_must_be_reported
51-
()
49+
internal void When_declared_variable_of_type_dynamic_is_assigned_to_implicitly_cast_string_constant_it_must_be_reported()
5250
{
5351
// Arrange
5452
ParsedSourceCode source = new MemberSourceCodeBuilder()
@@ -66,9 +64,7 @@ void M()
6664
}
6765

6866
[Fact]
69-
public void
70-
When_declared_variable_of_type_dynamic_is_assigned_to_explicitly_cast_string_constant_it_must_be_skipped
71-
()
67+
internal void When_declared_variable_of_type_dynamic_is_assigned_to_explicitly_cast_string_constant_it_must_be_skipped()
7268
{
7369
// Arrange
7470
ParsedSourceCode source = new MemberSourceCodeBuilder()

src/CSharpGuidelinesAnalyzer/CSharpGuidelinesAnalyzer.Test/Specs/Maintainability/AssignVariablesInSeparateStatementsSpecs.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,7 @@ void M(ref int parameter1)
409409
}
410410

411411
[Fact]
412-
internal void When_multiple_identifiers_are_assigned_in_the_body_of_a_do_while_loop_statement_it_must_be_skipped
413-
()
412+
internal void When_multiple_identifiers_are_assigned_in_the_body_of_a_do_while_loop_statement_it_must_be_skipped()
414413
{
415414
// Arrange
416415
ParsedSourceCode source = new MemberSourceCodeBuilder()
@@ -522,8 +521,7 @@ void M(ref int parameter1)
522521
}
523522

524523
[Fact]
525-
internal void When_multiple_identifiers_are_assigned_in_the_case_clause_of_a_switch_statement_it_must_be_skipped
526-
()
524+
internal void When_multiple_identifiers_are_assigned_in_the_case_clause_of_a_switch_statement_it_must_be_skipped()
527525
{
528526
// Arrange
529527
ParsedSourceCode source = new MemberSourceCodeBuilder()

src/CSharpGuidelinesAnalyzer/CSharpGuidelinesAnalyzer.Test/Specs/Maintainability/AvoidBooleanParametersSpecs.cs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,7 @@ public void M(bool b)
395395
}
396396

397397
[Fact]
398-
internal void
399-
When_public_method_parameter_type_is_nullable_bool_in_implicit_interface_implementation_it_must_be_skipped()
398+
internal void When_public_method_parameter_type_is_nullable_bool_in_implicit_interface_implementation_it_must_be_skipped()
400399
{
401400
// Arrange
402401
ParsedSourceCode source = new TypeSourceCodeBuilder()
@@ -446,8 +445,7 @@ void I.M(bool b)
446445
}
447446

448447
[Fact]
449-
internal void
450-
When_public_method_parameter_type_is_nullable_bool_in_explicit_interface_implementation_it_must_be_skipped()
448+
internal void When_public_method_parameter_type_is_nullable_bool_in_explicit_interface_implementation_it_must_be_skipped()
451449
{
452450
// Arrange
453451
ParsedSourceCode source = new TypeSourceCodeBuilder()
@@ -472,8 +470,7 @@ void I.M(bool? b)
472470
}
473471

474472
[Fact]
475-
internal void When_public_indexer_parameter_type_is_bool_in_implicit_interface_implementation_it_must_be_skipped
476-
()
473+
internal void When_public_indexer_parameter_type_is_bool_in_implicit_interface_implementation_it_must_be_skipped()
477474
{
478475
// Arrange
479476
ParsedSourceCode source = new TypeSourceCodeBuilder()
@@ -504,8 +501,7 @@ public int this[bool b]
504501

505502
[Fact]
506503
internal void
507-
When_public_indexer_parameter_type_is_nullable_bool_in_implicit_interface_implementation_it_must_be_skipped
508-
()
504+
When_public_indexer_parameter_type_is_nullable_bool_in_implicit_interface_implementation_it_must_be_skipped()
509505
{
510506
// Arrange
511507
ParsedSourceCode source = new TypeSourceCodeBuilder()
@@ -535,8 +531,7 @@ public int this[bool? b]
535531
}
536532

537533
[Fact]
538-
internal void When_public_indexer_parameter_type_is_bool_in_explicit_interface_implementation_it_must_be_skipped
539-
()
534+
internal void When_public_indexer_parameter_type_is_bool_in_explicit_interface_implementation_it_must_be_skipped()
540535
{
541536
// Arrange
542537
ParsedSourceCode source = new TypeSourceCodeBuilder()
@@ -567,8 +562,7 @@ int I.this[bool b]
567562

568563
[Fact]
569564
internal void
570-
When_public_indexer_parameter_type_is_nullable_bool_in_explicit_interface_implementation_it_must_be_skipped
571-
()
565+
When_public_indexer_parameter_type_is_nullable_bool_in_explicit_interface_implementation_it_must_be_skipped()
572566
{
573567
// Arrange
574568
ParsedSourceCode source = new TypeSourceCodeBuilder()

0 commit comments

Comments
 (0)