Skip to content

Commit 807c17a

Browse files
committed
Fix status generator
1 parent aaa19c7 commit 807c17a

4 files changed

Lines changed: 14 additions & 18 deletions

File tree

StyleCop.Analyzers/StyleCop.Analyzers.Status.Generator/App.config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
55
<dependentAssembly>
66
<assemblyIdentity name="Microsoft.CodeAnalysis" publicKeyToken="31bf3856ad364e35" culture="neutral" />
7-
<bindingRedirect oldVersion="0.0.0.0-2.9.0.0" newVersion="2.9.0.0" />
7+
<bindingRedirect oldVersion="0.0.0.0-3.7.0.0" newVersion="3.7.0.0" />
88
</dependentAssembly>
99
</assemblyBinding>
1010
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
1111
<dependentAssembly>
1212
<assemblyIdentity name="Microsoft.CodeAnalysis.Workspaces" publicKeyToken="31bf3856ad364e35" culture="neutral" />
13-
<bindingRedirect oldVersion="0.0.0.0-2.9.0.0" newVersion="2.9.0.0" />
13+
<bindingRedirect oldVersion="0.0.0.0-3.7.0.0" newVersion="3.7.0.0" />
1414
</dependentAssembly>
1515
</assemblyBinding>
1616
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
1717
<dependentAssembly>
1818
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp" publicKeyToken="31bf3856ad364e35" culture="neutral" />
19-
<bindingRedirect oldVersion="0.0.0.0-2.9.0.0" newVersion="2.9.0.0" />
19+
<bindingRedirect oldVersion="0.0.0.0-3.7.0.0" newVersion="3.7.0.0" />
2020
</dependentAssembly>
2121
</assemblyBinding>
2222
</runtime>

StyleCop.Analyzers/StyleCop.Analyzers.Status.Generator/SolutionReader.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ private string GetStatus(INamedTypeSymbol classSymbol, SyntaxNode root, Semantic
262262

263263
// We use the fact that the only parameter that returns a boolean is the one we are interested in
264264
var enabledByDefaultParameter = from argument in initializer.ArgumentList.Arguments
265-
where Equals(model.GetTypeInfo(argument.Expression).Type, this.booleanType)
265+
where SymbolEqualityComparer.Default.Equals(model.GetTypeInfo(argument.Expression).Type, this.booleanType)
266266
select argument.Expression;
267267
var parameter = enabledByDefaultParameter.FirstOrDefault();
268268
string parameterString = parameter.ToString();
@@ -296,7 +296,7 @@ private IEnumerable<DiagnosticDescriptor> GetDescriptor(INamedTypeSymbol classSy
296296

297297
var noCodeFixAttribute = classSymbol
298298
.GetAttributes()
299-
.SingleOrDefault(x => Equals(x.AttributeClass, this.noCodeFixAttributeTypeSymbol));
299+
.SingleOrDefault(x => SymbolEqualityComparer.Default.Equals(x.AttributeClass, this.noCodeFixAttributeTypeSymbol));
300300

301301
bool hasCodeFix = noCodeFixAttribute == null;
302302
if (!hasCodeFix)
@@ -355,7 +355,7 @@ private bool InheritsFrom(INamedTypeSymbol declaration, INamedTypeSymbol possibl
355355
{
356356
while (declaration != null)
357357
{
358-
if (declaration.Equals(possibleBaseType))
358+
if (SymbolEqualityComparer.Default.Equals(declaration, possibleBaseType))
359359
{
360360
return true;
361361
}

StyleCop.Analyzers/StyleCop.Analyzers.Status.Generator/StyleCop.Analyzers.Status.Generator.csproj

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project Sdk="Microsoft.NET.Sdk">
33

44
<PropertyGroup>
5-
<TargetFramework>net46</TargetFramework>
5+
<TargetFramework>net472</TargetFramework>
66
<OutputType>Exe</OutputType>
77

88
<!-- Automatically generate the necessary assembly binding redirects -->
@@ -19,16 +19,12 @@
1919
</PropertyGroup>
2020

2121
<ItemGroup>
22-
<Reference Include="System" />
23-
<Reference Include="System.Windows.Forms" />
24-
</ItemGroup>
25-
26-
<ItemGroup>
27-
<PackageReference Include="LibGit2Sharp" Version="0.24.0" />
28-
<PackageReference Include="Microsoft.Build.Locator" Version="1.2.2" />
29-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.9.0-beta4-62830-01" />
30-
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="2.9.0-beta4-62830-01" />
31-
<PackageReference Include="Newtonsoft.Json" Version="7.0.1-beta3" />
22+
<PackageReference Include="System.Collections.Immutable" Version="1.7.1" />
23+
<PackageReference Include="LibGit2Sharp" Version="0.26.2" />
24+
<PackageReference Include="Microsoft.Build.Locator" Version="1.2.6" />
25+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.7.0" />
26+
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="3.7.0" />
27+
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
3228
</ItemGroup>
3329

3430
</Project>

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ build:
1313
project: StyleCopAnalyzers.sln
1414
verbosity: minimal
1515
test_script:
16-
- .\StyleCop.Analyzers\StyleCop.Analyzers.Status.Generator\bin\%Configuration%\net46\StyleCop.Analyzers.Status.Generator.exe .\StyleCopAnalyzers.sln > StyleCop.Analyzers.Status.json
16+
- .\StyleCop.Analyzers\StyleCop.Analyzers.Status.Generator\bin\%Configuration%\net472\StyleCop.Analyzers.Status.Generator.exe .\StyleCopAnalyzers.sln > StyleCop.Analyzers.Status.json
1717
cache:
1818
- packages -> **\packages.config
1919
- C:\Users\appveyor\.nuget\packages -> appveyor.yml

0 commit comments

Comments
 (0)