chore: move StyleCop settings to a shared props file

This commit is contained in:
Christopher Willis-Ford 2022-09-23 14:14:13 -07:00
parent 7a1e0d014a
commit 616ed440cc
4 changed files with 22 additions and 13 deletions

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<Project>
<PropertyGroup Label="StyleCop">
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup Label="StyleCop">
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<AdditionalFiles Include="$(SolutionDir)stylecop.json" />
</ItemGroup>
</Project>

View file

@ -6,7 +6,7 @@
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
<PropertyGroup />
<Import Project="scratch-link-common.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
<Import Project="$(SolutionDir)SharedProps\StyleCop.props" />
</Project>

View file

@ -189,24 +189,14 @@
</ItemGroup>
<Import Project="..\scratch-link-common\scratch-link-common.projitems" Label="Shared" Condition="Exists('..\scratch-link-common\scratch-link-common.projitems')" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.CSharp.targets" />
<PropertyGroup Label="StyleCop">
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup Label="StyleCop">
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<AdditionalFiles Include="$(SolutionDir)stylecop.json" />
<Import Project="$(SolutionDir)SharedProps\StyleCop.props" />
<ItemGroup>
<PackageReference Include="Fleck">
<Version>1.2.0</Version>
</PackageReference>
<PackageReference Include="InTheHand.IOBluetooth">
<Version>1.0.1</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Text.Json">
<Version>6.0.5</Version>
</PackageReference>

View file

@ -31,6 +31,11 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "scratch-link-common", "scra
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "scratch-link-mac", "scratch-link-mac\scratch-link-mac.csproj", "{CDF7978E-13C6-40A9-81F9-2A3B4F7E861C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SharedProps", "SharedProps", "{52974047-90CA-4584-811B-242220DB05AB}"
ProjectSection(SolutionItems) = preProject
SharedProps\StyleCop.props = SharedProps\StyleCop.props
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -53,6 +58,7 @@ Global
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{76FB6BC3-4F2E-46D1-97C2-60345B053C9C} = {E37C17DD-8722-46CA-AB2F-B2A42845B3B1}
{52974047-90CA-4584-811B-242220DB05AB} = {E37C17DD-8722-46CA-AB2F-B2A42845B3B1}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572}