Skip to content

Commit 437ac43

Browse files
authored
Cleanup project files (#543)
* Remove langversion override in project files * Unifiy authors, copyright and product properties * Remove XML property * Remove output type * Unifiy documentation files * Cleanup whitespace * Remove compiler defines * Cleanup references * Include StyleCop in all projects * Move test references to Directory.Build.props * Move copyright to Directory.Build.Props * Move NetAnalyzers to Directory.Build.Props
1 parent ec2e1cc commit 437ac43

File tree

36 files changed

+137
-808
lines changed

36 files changed

+137
-808
lines changed

src/Cake.Issues.DocFx.Tests/Cake.Issues.DocFx.Tests.csproj

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,31 @@
1-
<?xml version="1.0" encoding="utf-8"?>
21
<Project Sdk="Microsoft.NET.Sdk">
32
<PropertyGroup>
4-
<OutputType>Library</OutputType>
53
<TargetFrameworks>net6.0</TargetFrameworks>
64
<IsPackable>false</IsPackable>
5+
<IsTestProject>true</IsTestProject>
76
<Description>Tests for the Cake.Issues.DocFx addin</Description>
8-
<Authors>Cake Issues contributors</Authors>
9-
<Product>Cake.Issues</Product>
10-
<Copyright>Copyright © Cake Issues contributors</Copyright>
117
</PropertyGroup>
12-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
13-
<CodeAnalysisRuleSet>..\Cake.Issues.Tests.ruleset</CodeAnalysisRuleSet>
14-
</PropertyGroup>
15-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
8+
9+
<PropertyGroup>
1610
<CodeAnalysisRuleSet>..\Cake.Issues.Tests.ruleset</CodeAnalysisRuleSet>
1711
</PropertyGroup>
12+
1813
<ItemGroup>
1914
<None Remove="Testfiles\entry-of-level-suggestion.json" />
2015
</ItemGroup>
16+
2117
<ItemGroup>
2218
<EmbeddedResource Include="Testfiles\docfx.json" />
2319
<EmbeddedResource Include="Testfiles\entry-of-level-suggestion.json" />
2420
<EmbeddedResource Include="Testfiles\entry-with-line.json" />
25-
</ItemGroup>
26-
<ItemGroup>
27-
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
28-
</ItemGroup>
29-
<ItemGroup>
3021
<EmbeddedResource Include="Testfiles\entry-with-line-0.json" />
3122
</ItemGroup>
23+
3224
<ItemGroup>
33-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
34-
<PackageReference Include="Cake.Testing" Version="4.0.0" />
35-
<PackageReference Include="Shouldly" Version="4.2.1" />
36-
<PackageReference Include="StyleCop.Analyzers">
37-
<Version>1.2.0-beta.556</Version>
38-
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
39-
<PrivateAssets>all</PrivateAssets>
40-
</PackageReference>
41-
<PackageReference Include="xunit">
42-
<Version>2.7.1</Version>
43-
</PackageReference>
44-
<PackageReference Include="xunit.runner.visualstudio">
45-
<Version>2.5.8</Version>
46-
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
47-
<PrivateAssets>all</PrivateAssets>
48-
</PackageReference>
49-
<PackageReference Include="Xunit.SkippableFact" Version="1.4.13" />
25+
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
5026
</ItemGroup>
5127

5228
<ItemGroup>
53-
<ProjectReference Include="..\Cake.Issues\Cake.Issues.csproj" />
5429
<ProjectReference Include="..\Cake.Issues.Testing\Cake.Issues.Testing.csproj" />
5530
<ProjectReference Include="..\Cake.Issues.DocFx\Cake.Issues.DocFx.csproj" />
5631
</ItemGroup>

src/Cake.Issues.DocFx/Cake.Issues.DocFx.csproj

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,16 @@
1-
<?xml version="1.0" encoding="utf-8"?>
21
<Project Sdk="Microsoft.NET.Sdk">
32
<PropertyGroup>
4-
<OutputType>Library</OutputType>
53
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
64
<Description>DocFx support for the Cake.Issues Addin for Cake Build Automation System</Description>
7-
<Authors>Cake Issues contributors</Authors>
8-
<Product>Cake.Issues</Product>
9-
<Copyright>Copyright © Cake Issues contributors</Copyright>
105
</PropertyGroup>
116

127
<PropertyGroup>
138
<DebugType>full</DebugType>
149
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
15-
<DocumentationFile>bin\Debug\Cake.Issues.DocFx.xml</DocumentationFile>
1610
<CodeAnalysisRuleSet>..\Cake.Issues.ruleset</CodeAnalysisRuleSet>
11+
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Cake.Issues.DocFx.xml</DocumentationFile>
1712
</PropertyGroup>
1813

19-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
20-
<DefineConstants>DEBUG;TRACE</DefineConstants>
21-
</PropertyGroup>
22-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
23-
<DefineConstants>TRACE</DefineConstants>
24-
</PropertyGroup>
25-
26-
<ItemGroup>
27-
<PackageReference Include="Cake.Core" Version="4.0.0" />
28-
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
29-
<PrivateAssets>all</PrivateAssets>
30-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
31-
</PackageReference>
32-
<PackageReference Include="StyleCop.Analyzers">
33-
<Version>1.2.0-beta.556</Version>
34-
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
35-
<PrivateAssets>all</PrivateAssets>
36-
</PackageReference>
37-
</ItemGroup>
38-
3914
<ItemGroup>
4015
<ProjectReference Include="..\Cake.Issues\Cake.Issues.csproj" />
4116
</ItemGroup>
Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
32
<PropertyGroup>
43
<TargetFramework>net6.0</TargetFramework>
54
<IsPackable>false</IsPackable>
6-
<Product>Cake.Issues</Product>
7-
<Copyright>Copyright © Cake Issues contributors</Copyright>
5+
<IsTestProject>true</IsTestProject>
86
<Description>Tests for the Cake.Issues.EsLint addin</Description>
9-
<Authors>Cake Issues contributors</Authors>
107
</PropertyGroup>
118

129
<PropertyGroup>
@@ -26,21 +23,7 @@
2623
</ItemGroup>
2724

2825
<ItemGroup>
29-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
30-
<PackageReference Include="Cake.Testing" Version="4.0.0" />
31-
<PackageReference Include="Shouldly" Version="4.2.1" />
32-
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
33-
<PrivateAssets>all</PrivateAssets>
34-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
35-
</PackageReference>
36-
<PackageReference Include="xunit" Version="2.7.1" />
37-
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.8" />
38-
</ItemGroup>
39-
40-
<ItemGroup>
41-
<ProjectReference Include="..\Cake.Issues\Cake.Issues.csproj" />
4226
<ProjectReference Include="..\Cake.Issues.Testing\Cake.Issues.Testing.csproj" />
4327
<ProjectReference Include="..\Cake.Issues.EsLint\Cake.Issues.EsLint.csproj" />
4428
</ItemGroup>
45-
4629
</Project>
Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
32
<PropertyGroup>
43
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
54
<Description>EsLint support for the Cake.Issues Addin for Cake Build Automation System</Description>
6-
<Authors>Cake Issues contributors</Authors>
7-
<Copyright>Copyright © Cake Issues contributors</Copyright>
8-
<Product>Cake.Issues</Product>
95
</PropertyGroup>
106

117
<PropertyGroup>
12-
<LangVersion>latest</LangVersion>
138
<DebugType>full</DebugType>
149
<DebugSymbols>true</DebugSymbols>
1510
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
@@ -18,20 +13,10 @@
1813
</PropertyGroup>
1914

2015
<ItemGroup>
21-
<PackageReference Include="Cake.Core" Version="4.0.0" PrivateAssets="All" />
22-
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
23-
<PrivateAssets>all</PrivateAssets>
24-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
25-
</PackageReference>
26-
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
27-
<PrivateAssets>all</PrivateAssets>
28-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
29-
</PackageReference>
3016
<PackageReference Include="System.Runtime.Serialization.Json" Version="4.3.0" />
3117
</ItemGroup>
3218

3319
<ItemGroup>
3420
<ProjectReference Include="..\Cake.Issues\Cake.Issues.csproj" />
3521
</ItemGroup>
36-
3722
</Project>

src/Cake.Issues.GitRepository.Tests/Cake.Issues.GitRepository.Tests.csproj

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,20 @@
1-
<?xml version="1.0" encoding="utf-8"?>
21
<Project Sdk="Microsoft.NET.Sdk">
32
<PropertyGroup>
4-
<OutputType>Library</OutputType>
53
<TargetFrameworks>net6.0</TargetFrameworks>
64
<IsPackable>false</IsPackable>
5+
<IsTestProject>true</IsTestProject>
76
<Description>Tests for the Cake.Issues.GitRepository addin</Description>
8-
<Authors>Cake Issues contributors</Authors>
9-
<Copyright>Copyright © Cake Issues contributors</Copyright>
10-
<Product>Cake.Issues</Product>
117
</PropertyGroup>
12-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
13-
<CodeAnalysisRuleSet>..\Cake.Issues.Tests.ruleset</CodeAnalysisRuleSet>
14-
</PropertyGroup>
15-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
8+
9+
<PropertyGroup>
1610
<CodeAnalysisRuleSet>..\Cake.Issues.Tests.ruleset</CodeAnalysisRuleSet>
1711
</PropertyGroup>
12+
1813
<ItemGroup>
1914
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
2015
</ItemGroup>
21-
<ItemGroup>
22-
<PackageReference Include="Cake.Testing">
23-
<Version>4.0.0</Version>
24-
</PackageReference>
25-
<PackageReference Include="Shouldly">
26-
<Version>4.2.1</Version>
27-
</PackageReference>
28-
<PackageReference Include="StyleCop.Analyzers">
29-
<Version>1.2.0-beta.556</Version>
30-
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
31-
<PrivateAssets>all</PrivateAssets>
32-
</PackageReference>
33-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
34-
<PackageReference Include="xunit">
35-
<Version>2.7.1</Version>
36-
</PackageReference>
37-
<PackageReference Include="xunit.runner.visualstudio">
38-
<Version>2.5.8</Version>
39-
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
40-
<PrivateAssets>all</PrivateAssets>
41-
</PackageReference>
42-
</ItemGroup>
4316

4417
<ItemGroup>
45-
<ProjectReference Include="..\Cake.Issues\Cake.Issues.csproj" />
4618
<ProjectReference Include="..\Cake.Issues.Testing\Cake.Issues.Testing.csproj" />
4719
<ProjectReference Include="..\Cake.Issues.GitRepository\Cake.Issues.GitRepository.csproj" />
4820
</ItemGroup>
Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,18 @@
1-
<?xml version="1.0" encoding="utf-8"?>
21
<Project Sdk="Microsoft.NET.Sdk">
32
<PropertyGroup>
4-
<OutputType>Library</OutputType>
53
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
64
<Description>Git repository linting support for the Cake.Issues addin for Cake Build Automation System</Description>
7-
<Authors>Cake Issues contributors</Authors>
8-
<Copyright>Copyright © Cake Issues contributors</Copyright>
9-
<Product>Cake.Issues</Product>
105
</PropertyGroup>
116

127
<PropertyGroup>
138
<DebugType>full</DebugType>
149
<DebugSymbols>true</DebugSymbols>
1510
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
1611
<CodeAnalysisRuleSet>..\Cake.Issues.ruleset</CodeAnalysisRuleSet>
12+
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Cake.Issues.GitRepository.xml</DocumentationFile>
1713
</PropertyGroup>
1814

19-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
20-
<DocumentationFile>bin\Debug\Cake.Issues.GitRepository.xml</DocumentationFile>
21-
<DefineConstants>DEBUG;TRACE</DefineConstants>
22-
</PropertyGroup>
23-
24-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
25-
<DocumentationFile>bin\Release\Cake.Issues.GitRepository.xml</DocumentationFile>
26-
<DefineConstants>TRACE</DefineConstants>
27-
</PropertyGroup>
28-
29-
<ItemGroup>
30-
<PackageReference Include="Cake.Core">
31-
<Version>4.0.0</Version>
32-
</PackageReference>
33-
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
34-
<PrivateAssets>all</PrivateAssets>
35-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
36-
</PackageReference>
37-
<PackageReference Include="StyleCop.Analyzers">
38-
<Version>1.2.0-beta.556</Version>
39-
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
40-
<PrivateAssets>all</PrivateAssets>
41-
</PackageReference>
42-
</ItemGroup>
43-
4415
<ItemGroup>
4516
<ProjectReference Include="..\Cake.Issues\Cake.Issues.csproj" />
4617
</ItemGroup>
47-
</Project>
18+
</Project>

src/Cake.Issues.InspectCode.Tests/Cake.Issues.InspectCode.Tests.csproj

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
<PropertyGroup>
44
<TargetFrameworks>net6.0</TargetFrameworks>
55
<IsPackable>false</IsPackable>
6-
<Product>Cake.Issues</Product>
6+
<IsTestProject>true</IsTestProject>
77
<Description>Tests for the Cake.Issues.InspectCode addin</Description>
8-
<Authors>Cake Issues contributors</Authors>
9-
<Copyright>Copyright © Cake Issues contributors</Copyright>
108
</PropertyGroup>
119

1210
<PropertyGroup>
@@ -26,24 +24,7 @@
2624
</ItemGroup>
2725

2826
<ItemGroup>
29-
<PackageReference Include="Cake.Testing" Version="4.0.0" />
30-
<PackageReference Include="Shouldly" Version="4.2.1" />
31-
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
32-
<PrivateAssets>all</PrivateAssets>
33-
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
34-
</PackageReference>
35-
<PackageReference Include="xunit" Version="2.7.1" />
36-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
37-
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.8">
38-
<PrivateAssets>all</PrivateAssets>
39-
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
40-
</PackageReference>
41-
<PackageReference Include="Xunit.SkippableFact" Version="1.4.13" />
42-
</ItemGroup>
43-
44-
<ItemGroup>
45-
<ProjectReference Include="..\Cake.Issues\Cake.Issues.csproj" />
4627
<ProjectReference Include="..\Cake.Issues.Testing\Cake.Issues.Testing.csproj" />
4728
<ProjectReference Include="..\Cake.Issues.InspectCode\Cake.Issues.InspectCode.csproj" />
4829
</ItemGroup>
49-
</Project>
30+
</Project>

src/Cake.Issues.InspectCode/Cake.Issues.InspectCode.csproj

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,16 @@
22

33
<PropertyGroup>
44
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
5-
<Product>Cake.Issues</Product>
65
<Description>JetBrains Inspect Code support for the Cake.Issues Addin for Cake Build Automation System</Description>
7-
<Authors>Cake Issues contributors</Authors>
8-
<Copyright>Copyright © Cake Issues contributors</Copyright>
96
</PropertyGroup>
107

118
<PropertyGroup>
9+
<DebugType>full</DebugType>
1210
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
1311
<CodeAnalysisRuleSet>..\Cake.Issues.ruleset</CodeAnalysisRuleSet>
14-
</PropertyGroup>
15-
16-
<PropertyGroup>
1712
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Cake.Issues.InspectCode.xml</DocumentationFile>
1813
</PropertyGroup>
1914

20-
<PropertyGroup>
21-
<DebugType>full</DebugType>
22-
</PropertyGroup>
23-
24-
<ItemGroup>
25-
<PackageReference Include="Cake.Core" Version="4.0.0" />
26-
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
27-
<PrivateAssets>all</PrivateAssets>
28-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
29-
</PackageReference>
30-
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
31-
<PrivateAssets>all</PrivateAssets>
32-
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
33-
</PackageReference>
34-
</ItemGroup>
35-
3615
<ItemGroup>
3716
<ProjectReference Include="..\Cake.Issues\Cake.Issues.csproj" />
3817
</ItemGroup>

0 commit comments

Comments
 (0)