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

Refactor to support RS1038 #216

Merged
merged 16 commits into from
Oct 13, 2024
Merged
Show file tree
Hide file tree
Changes from 6 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
3 changes: 1 addition & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
- https://github.com/dotnet/roslyn/blob/main/docs/wiki/NuGet-packages.md
- https://learn.microsoft.com/en-us/visualstudio/productinfo/vs-servicing
-->

<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.3.1" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.8.0" />
rjmurillo marked this conversation as resolved.
Show resolved Hide resolved
</ItemGroup>
<ItemGroup>
<PackageVersion Include="BenchmarkDotNet" Version="0.13.12" />
Expand Down
6 changes: 6 additions & 0 deletions Moq.Analyzers.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Moq.Analyzers.Test", "tests
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Moq.Analyzers.Benchmarks", "tests\Moq.Analyzers.Benchmarks\Moq.Analyzers.Benchmarks.csproj", "{11B3412F-456C-452E-94D2-B42D5C52F61C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Moq.CodeFixes", "src\Moq.CodeFixes\Moq.CodeFixes.csproj", "{8E99C15C-E80A-49E5-988C-1B5071CE775F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -27,6 +29,10 @@ Global
{11B3412F-456C-452E-94D2-B42D5C52F61C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{11B3412F-456C-452E-94D2-B42D5C52F61C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{11B3412F-456C-452E-94D2-B42D5C52F61C}.Release|Any CPU.Build.0 = Release|Any CPU
{8E99C15C-E80A-49E5-988C-1B5071CE775F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
rjmurillo marked this conversation as resolved.
Show resolved Hide resolved
{8E99C15C-E80A-49E5-988C-1B5071CE775F}.Debug|Any CPU.Build.0 = Debug|Any CPU
rjmurillo marked this conversation as resolved.
Show resolved Hide resolved
{8E99C15C-E80A-49E5-988C-1B5071CE775F}.Release|Any CPU.ActiveCfg = Release|Any CPU
rjmurillo marked this conversation as resolved.
Show resolved Hide resolved
{8E99C15C-E80A-49E5-988C-1B5071CE775F}.Release|Any CPU.Build.0 = Release|Any CPU
rjmurillo marked this conversation as resolved.
Show resolved Hide resolved
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
3 changes: 2 additions & 1 deletion build/targets/codeanalysis/Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
<ItemGroup>
<PackageVersion Include="Meziantou.Analyzer" Version="2.0.169" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
<PackageVersion Include="Roslynator.Analyzers" Version="4.12.7" />
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="9.32.0.97167" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="9.32.0.97167" />
rjmurillo marked this conversation as resolved.
Show resolved Hide resolved
<PackageVersion Include="SquiggleCop.Tasks" Version="1.0.26" />
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.11.20" />
<PackageVersion Include="ExhaustiveMatching.Analyzer" Version="0.5.0" />
Expand Down
7 changes: 6 additions & 1 deletion src/Moq.Analyzers/Moq.Analyzers.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand All @@ -36,6 +36,11 @@
<None Include="$(RepoRoot)\README.md" Pack="true" PackagePath="/" />
<None Update="tools\*.ps1" CopyToOutputDirectory="Always" Pack="true" PackagePath="" />
<None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
<None Include="$(OutputPath)\Moq.CodeFixes.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="$(RepoRoot)\src\Moq.CodeFixes\Moq.CodeFixes.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
using Microsoft.CodeAnalysis.CodeFixes;
using Microsoft.CodeAnalysis.Text;

namespace Moq.Analyzers;
namespace Moq.CodeFixes;

/// <summary>
/// Fixes <see cref="CallbackSignatureShouldMatchMockedMethodAnalyzer"/>.

Check failure on line 10 in src/Moq.CodeFixes/CallbackSignatureShouldMatchMockedMethodCodeFix.cs

View workflow job for this annotation

GitHub Actions / build (windows-2022)

XML comment has cref attribute 'CallbackSignatureShouldMatchMockedMethodAnalyzer' that could not be resolved

Check failure on line 10 in src/Moq.CodeFixes/CallbackSignatureShouldMatchMockedMethodCodeFix.cs

View workflow job for this annotation

GitHub Actions / build (windows-2022)

XML comment has cref attribute 'CallbackSignatureShouldMatchMockedMethodAnalyzer' that could not be resolved

Check failure on line 10 in src/Moq.CodeFixes/CallbackSignatureShouldMatchMockedMethodCodeFix.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04)

XML comment has cref attribute 'CallbackSignatureShouldMatchMockedMethodAnalyzer' that could not be resolved

Check failure on line 10 in src/Moq.CodeFixes/CallbackSignatureShouldMatchMockedMethodCodeFix.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04)

XML comment has cref attribute 'CallbackSignatureShouldMatchMockedMethodAnalyzer' that could not be resolved
/// </summary>
[ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(CallbackSignatureShouldMatchMockedMethodCodeFix))]
[Shared]
Expand Down
26 changes: 26 additions & 0 deletions src/Moq.CodeFixes/Moq.CodeFixes.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">
rjmurillo marked this conversation as resolved.
Show resolved Hide resolved

rjmurillo marked this conversation as resolved.
Show resolved Hide resolved
<PropertyGroup>
rjmurillo marked this conversation as resolved.
Show resolved Hide resolved
<RootNamespace>Moq.CodeFixes</RootNamespace>
rjmurillo marked this conversation as resolved.
Show resolved Hide resolved
<AssemblyName>Moq.CodeFixes</AssemblyName>
rjmurillo marked this conversation as resolved.
Show resolved Hide resolved
<TargetFramework>netstandard2.0</TargetFramework>
rjmurillo marked this conversation as resolved.
Show resolved Hide resolved
</PropertyGroup>
rjmurillo marked this conversation as resolved.
Show resolved Hide resolved
rjmurillo marked this conversation as resolved.
Show resolved Hide resolved

<ItemGroup>
rjmurillo marked this conversation as resolved.
Show resolved Hide resolved
<Compile Include="..\Moq.Analyzers\Common\DiagnosticIds.cs" Link="Common\DiagnosticIds.cs" />
<Compile Include="..\Moq.Analyzers\Common\MoqMethodDescriptorBase.cs" Link="Common\MoqMethodDescriptorBase.cs" />
<Compile Include="..\Moq.Analyzers\Common\SemanticModelExtensions.cs" Link="Common\SemanticModelExtensions.cs" />
<Compile Include="..\Moq.Analyzers\Common\WellKnownTypeNames.cs" Link="Common\WellKnownTypeNames.cs" />
<Compile Include="..\Moq.Analyzers\GlobalUsings.cs" Link="GlobalUsings.cs" />
<Compile Include="..\Moq.Analyzers\MoqSetupMethodDescriptor.cs" Link="MoqSetupMethodDescriptor.cs" />
</ItemGroup>
rjmurillo marked this conversation as resolved.
Show resolved Hide resolved

<ItemGroup>
rjmurillo marked this conversation as resolved.
Show resolved Hide resolved
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" PrivateAssets="all" />
rjmurillo marked this conversation as resolved.
Show resolved Hide resolved
</ItemGroup>
rjmurillo marked this conversation as resolved.
Show resolved Hide resolved

<ItemGroup>
rjmurillo marked this conversation as resolved.
Show resolved Hide resolved
<Folder Include="Common\" />
</ItemGroup>
rjmurillo marked this conversation as resolved.
Show resolved Hide resolved

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

<ItemGroup>
<ProjectReference Include="$(RepoRoot)/src/Moq.Analyzers/Moq.Analyzers.csproj" />
<ProjectReference Include="..\..\src\Moq.CodeFixes\Moq.CodeFixes.csproj" />
rjmurillo marked this conversation as resolved.
Show resolved Hide resolved
<PackageReference Include="BenchmarkDotNet" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Xunit.Abstractions;
using Verifier = Moq.Analyzers.Test.Helpers.CodeFixVerifier<Moq.Analyzers.CallbackSignatureShouldMatchMockedMethodAnalyzer, Moq.Analyzers.CallbackSignatureShouldMatchMockedMethodCodeFix>;
using Verifier = Moq.Analyzers.Test.Helpers.CodeFixVerifier<Moq.Analyzers.CallbackSignatureShouldMatchMockedMethodAnalyzer, Moq.CodeFixes.CallbackSignatureShouldMatchMockedMethodCodeFix>;

namespace Moq.Analyzers.Test;

Expand Down
1 change: 1 addition & 0 deletions tests/Moq.Analyzers.Test/Moq.Analyzers.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(RepoRoot)/src/Moq.Analyzers/Moq.Analyzers.csproj" AddPackageAsOutput="true" />
<ProjectReference Include="..\..\src\Moq.CodeFixes\Moq.CodeFixes.csproj" />
rjmurillo marked this conversation as resolved.
Show resolved Hide resolved
</ItemGroup>

</Project>
Loading