Skip to content

Commit dccdf5b

Browse files
authored
Merge pull request #28 from kevinbosman/wave8
ReSharper 2017.1 support (Wave 8)
2 parents aa64ac2 + dd08fb3 commit dccdf5b

File tree

16 files changed

+267
-129
lines changed

16 files changed

+267
-129
lines changed

CleanCode/src/CleanCode.nuspec

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package >
33
<metadata>
44
<id>CleanCode.CleanCode</id>
5-
<version>5.0.3</version>
5+
<version>5.1.0</version>
66
<title>Clean Code</title>
77
<authors>Hadi Hariri, Matt Ellis, SuperJMN</authors>
88
<owners>Hadi Hariri, Matt Ellis</owners>
@@ -12,6 +12,9 @@
1212
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1313
<description>Automates some of the concepts in Uncle Bob's Clean Code book</description>
1414
<releaseNotes>
15+
&#8226; Updated to ReSharper 2017.1
16+
17+
From 5.0.3:
1518
&#8226; Stop marking abstract methods too long (#19)
1619

1720
From 5.0.2:
@@ -33,11 +36,11 @@ From 4.0.0:
3336
</releaseNotes>
3437
<copyright>Copyright 2014-2016 Hadi Hariri and Contributors</copyright>
3538
<dependencies>
36-
<dependency id="Wave" version="[6.0]" />
39+
<dependency id="Wave" version="[8.0]" />
3740
</dependencies>
3841
<tags>clean code</tags>
3942
</metadata>
40-
<files>
43+
<files>
4144
<file src="CleanCode\bin\Release\CleanCode.dll" target="DotFiles" />
4245
</files>
4346
</package>

CleanCode/src/CleanCode/CleanCode.csproj

Lines changed: 192 additions & 59 deletions
Large diffs are not rendered by default.

CleanCode/src/CleanCode/Features/ChainedReferences/ChainedReferencesCheck.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class ChainedReferencesCheck : ElementProblemAnalyzer<ICSharpStatement>
1818
{
1919
protected override void Run(ICSharpStatement element, ElementProblemAnalyzerData data, IHighlightingConsumer consumer)
2020
{
21-
if (!element.IsEmbeddedStatement)
21+
if (!element.CanBeEmbedded)
2222
{
2323
var threshold = data.SettingsStore.GetValue((CleanCodeSettings s) => s.MaximumChainedReferences);
2424
HighlightMethodChainsThatAreTooLong(element, consumer, threshold);

CleanCode/src/CleanCode/Features/ChainedReferences/MaximumChainedReferencesHighlighting.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
[assembly: RegisterConfigurableSeverity(MaximumChainedReferencesHighlighting.SeverityID, null,
88
CleanCodeHighlightingGroupIds.CleanCode, "Too many chained references", "Too many chained references can break the Law of Demeter.",
9-
Severity.WARNING, false)]
9+
Severity.WARNING)]
1010

1111
namespace CleanCode.Features.ChainedReferences
1212
{

CleanCode/src/CleanCode/Features/ClassTooBig/ClassTooBigHighlighting.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
[assembly: RegisterConfigurableSeverity(ClassTooBigHighlighting.SeverityID, null,
88
CleanCodeHighlightingGroupIds.CleanCode, "Class too big", "This class contains too many methods",
9-
Severity.SUGGESTION, false)]
9+
Severity.SUGGESTION)]
1010

1111
namespace CleanCode.Features.ClassTooBig
1212
{

CleanCode/src/CleanCode/Features/ComplexExpression/ComplexConditionExpressionHighlighting.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
[assembly:RegisterConfigurableSeverity(ComplexConditionExpressionHighlighting.SeverityID, null,
99
CleanCodeHighlightingGroupIds.CleanCode, "Condition expression too complex", "The expression in the condition is too complex.",
10-
Severity.WARNING, false)]
10+
Severity.WARNING)]
1111

1212
namespace CleanCode.Features.ComplexExpression
1313
{

CleanCode/src/CleanCode/Features/ExcessiveIndentation/ExcessiveIndentHighlighting.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
[assembly:RegisterConfigurableSeverity(ExcessiveIndentHighlighting.SeverityID, null,
99
CleanCodeHighlightingGroupIds.CleanCode, "Excessive indentation", "The nesting in this method is excessive.",
10-
Severity.WARNING, false)]
10+
Severity.WARNING)]
1111

1212
namespace CleanCode.Features.ExcessiveIndentation
1313
{

CleanCode/src/CleanCode/Features/ExtensionMethods.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,6 @@ private static IType TryGetClosedReturnTypeFromReference(IReference reference)
132132
{
133133
var resolveResultWithInfo = GetResolveResult(reference);
134134

135-
if (reference.CurrentResolveResult == null)
136-
reference.Resolve();
137-
138135
var declaredElement = resolveResultWithInfo.DeclaredElement;
139136
var parametersOwner = declaredElement as IParametersOwner;
140137

@@ -155,11 +152,6 @@ private static IType GetClosedType(ResolveResultWithInfo resolveResultWithInfo,
155152

156153
public static ResolveResultWithInfo GetResolveResult(this IReference reference)
157154
{
158-
if (reference.CurrentResolveResult != null)
159-
{
160-
return reference.CurrentResolveResult;
161-
}
162-
163155
return reference.Resolve();
164156
}
165157
}

CleanCode/src/CleanCode/Features/FlagArguments/FlagArgumentsHighlighting.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
[assembly: RegisterConfigurableSeverity(FlagArgumentsHighlighting.SeverityID, null,
99
CleanCodeHighlightingGroupIds.CleanCode, "Flag argument", "An argument that is used as a flag.",
10-
Severity.WARNING, false)]
10+
Severity.WARNING)]
1111

1212
namespace CleanCode.Features.FlagArguments
1313
{

CleanCode/src/CleanCode/Features/HollowNames/HollowTypeNameHighlighting.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
[assembly: RegisterConfigurableSeverity(HollowTypeNameHighlighting.SeverityID, null,
88
CleanCodeHighlightingGroupIds.CleanCode, "Hollow type name", "This type has a name that doesn't express its intent.",
9-
Severity.SUGGESTION, false)]
9+
Severity.SUGGESTION)]
1010

1111
namespace CleanCode.Features.HollowNames
1212
{

0 commit comments

Comments
 (0)