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

Configure rulesets in Directory.Build.props #583

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 0 additions & 4 deletions src/Cake.Issues.DocFx.Tests/Cake.Issues.DocFx.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<Description>Tests for the Cake.Issues.DocFx addin</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.Tests.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<None Remove="Testfiles\entry-of-level-suggestion.json" />
</ItemGroup>
Expand Down
4 changes: 0 additions & 4 deletions src/Cake.Issues.DocFx/Cake.Issues.DocFx.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<Description>DocFx support for the Cake.Issues Addin for Cake Build Automation System</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Cake.Issues\Cake.Issues.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<Description>Tests for the Cake.Issues.EsLint addin</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.Tests.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<None Remove="Testfiles\JsonLogFileFormat\issueWithoutLineAndColumn.json" />
<None Remove="Testfiles\JsonLogFileFormat\issueWithoutRule.json" />
Expand Down
4 changes: 0 additions & 4 deletions src/Cake.Issues.EsLint/Cake.Issues.EsLint.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<Description>EsLint support for the Cake.Issues Addin for Cake Build Automation System</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Runtime.Serialization.Json" Version="4.3.0" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<Description>Tests for the Cake.Issues.GitRepository addin</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.Tests.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Cake.Issues.GitRepository\Cake.Issues.GitRepository.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<Description>Git repository linting support for the Cake.Issues addin for Cake Build Automation System</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Cake.Issues\Cake.Issues.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
<Description>Tests for the Cake.Issues.InspectCode addin</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.Tests.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<None Remove="Testfiles\inspectcode.xml" />
<None Remove="Testfiles\WithoutLineButOffset.xml" />
Expand Down
4 changes: 0 additions & 4 deletions src/Cake.Issues.InspectCode/Cake.Issues.InspectCode.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
<Description>JetBrains Inspect Code support for the Cake.Issues Addin for Cake Build Automation System</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Cake.Issues\Cake.Issues.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<Description>Tests for the Cake.Issues.Markdownlint addin</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.Tests.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<None Remove="Testfiles\MarkdownlintCliJsonLogFileFormat\AbsoluteFilePath.json" />
<None Remove="Testfiles\MarkdownlintCliJsonLogFileFormat\empty.json" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<Description>Markdownlint support for the Cake.Issues Addin for Cake Build Automation System</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Cake.Issues\Cake.Issues.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.Tests.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<None Remove="Testfiles\**\*" />
</ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion src/Cake.Issues.MsBuild/Cake.Issues.MsBuild.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.ruleset</CodeAnalysisRuleSet>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<Description>Tests for the Cake.Issues.PullRequests.AppVeyor addin</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.Tests.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NSubstitute" Version="5.1.0" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<Description>Addin for writing code analyzer or linter issues to AppVeyor</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Cake.Common" Version="4.0.0" PrivateAssets="All" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<Description>Tests for the Cake.Issues.PullRequests.AzureDevOps addin</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.Tests.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Cake.AzureDevOps" Version="4.0.0" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<Description>Azure DevOps support for the Cake.Issues addin for Cake Build Automation System</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<InternalsVisibleTo Include="Cake.Issues.PullRequests.AzureDevOps.Tests" />
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<Description>Tests for the Cake.Issues.PullRequests.GitHubActions addin</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.Tests.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Cake.Issues.PullRequests.GitHubActions\Cake.Issues.PullRequests.GitHubActions.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<Description>Addin for writing code analyzer or linter issues to GitHub Actions</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Cake.Issues.PullRequests\Cake.Issues.PullRequests.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<Description>Tests for the Cake.Issues.PullRequests addin</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.Tests.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Cake.Issues.PullRequests\Cake.Issues.PullRequests.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<Description>Addin for the Cake build automation system for writing code analyzer or linter issues as comments to pull requests</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Cake.Issues\Cake.Issues.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<Description>Tests for the Cake.Issues.Reporting.Console addin</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.Tests.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<None Remove="Testfiles\issues.json" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.ruleset</CodeAnalysisRuleSet>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<Description>Tests for the Cake.Issues.Reporting.Generic addin</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.Tests.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<!-- To disable parallelization in xunit builds while running "dotnet test" a configuration file is required. -->
<!-- For disabling parallelization in test execution inside Visual Studio see DisableTestParallelization attribute. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.ruleset</CodeAnalysisRuleSet>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<Description>Tests for the Cake.Issues.Reporting.Sarif addin</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.Tests.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Cake.Issues.Reporting.Sarif\Cake.Issues.Reporting.Sarif.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.ruleset</CodeAnalysisRuleSet>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<Description>Tests for the Cake.Issues.Reporting addin</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.Tests.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Cake.Issues.Reporting\Cake.Issues.Reporting.csproj" />
</ItemGroup>
Expand Down
4 changes: 0 additions & 4 deletions src/Cake.Issues.Reporting/Cake.Issues.Reporting.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<Description>Addin for the Cake build automation system for creating reports for issues from any code analyzer or linter</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Cake.Issues\Cake.Issues.csproj" />
</ItemGroup>
Expand Down
4 changes: 0 additions & 4 deletions src/Cake.Issues.Sarif.Tests/Cake.Issues.Sarif.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<Description>Tests for the Cake.Issues.Sarif addin</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.Tests.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<EmbeddedResource Include="Testfiles\cake.issues.reporting.sarif.sarif" />
<EmbeddedResource Include="Testfiles\comprehensive.sarif" />
Expand Down
1 change: 0 additions & 1 deletion src/Cake.Issues.Sarif/Cake.Issues.Sarif.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.ruleset</CodeAnalysisRuleSet>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<Description>Tests for the Cake.Issues.Terraform addin</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.Tests.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<None Remove="Testfiles\error.json" />
<None Remove="Testfiles\warning-across-multiple-lines.json" />
Expand Down
4 changes: 0 additions & 4 deletions src/Cake.Issues.Terraform/Cake.Issues.Terraform.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<Description>Terraform support for the Cake.Issues Addin for Cake Build Automation System</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Cake.Issues\Cake.Issues.csproj" />
</ItemGroup>
Expand Down
4 changes: 0 additions & 4 deletions src/Cake.Issues.Testing/Cake.Issues.Testing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<Description>Common helpers for testing addins based on Cake.Issues</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Cake.Testing" Version="4.0.0" />
</ItemGroup>
Expand Down
4 changes: 0 additions & 4 deletions src/Cake.Issues.Tests/Cake.Issues.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<Description>Tests for the Cake.Issues addin</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.Tests.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<None Remove="Testfiles\Build.log" />
<None Remove="Testfiles\Empty.log" />
Expand Down
4 changes: 0 additions & 4 deletions src/Cake.Issues/Cake.Issues.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<Description>Addin for reading code analyzer or linter issues for the Cake build automation system</Description>
</PropertyGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Cake.Core" Version="4.0.0" />
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
Expand Down
2 changes: 2 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<When Condition="!$(MSBuildProjectName.EndsWith('.Tests'))">
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<CodeAnalysisRuleSet>..\Cake.Issues.ruleset</CodeAnalysisRuleSet>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
</PropertyGroup>

Expand All @@ -35,6 +36,7 @@
<Choose>
<When Condition="$(MSBuildProjectName.EndsWith('.Tests'))">
<PropertyGroup>
<CodeAnalysisRuleSet>..\Cake.Issues.Tests.ruleset</CodeAnalysisRuleSet>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

Expand Down
Loading