From be4119f978b40c64f97824c498a072ed4769bd95 Mon Sep 17 00:00:00 2001 From: AdmiringWorm Date: Sat, 25 Jul 2020 11:34:13 +0200 Subject: [PATCH] fix(project): fix test project not generated with documentation comments disabled --- .../default/nunit/testProject/testProject.csproj | 1 + .../default/xunit/testProject/testProject.csproj | 1 + __tests__/project/space/testProject.csproj | 1 + .../Cake.Template.Tests.csproj.tmpl | 12 ++++++++---- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/__tests__/project/default/nunit/testProject/testProject.csproj b/__tests__/project/default/nunit/testProject/testProject.csproj index dcc01163..aad77055 100644 --- a/__tests__/project/default/nunit/testProject/testProject.csproj +++ b/__tests__/project/default/nunit/testProject/testProject.csproj @@ -3,6 +3,7 @@ netcoreapp2.0 $(TargetFrameworks);net461 + $(NoWarn);CS1591;SA1600 false diff --git a/__tests__/project/default/xunit/testProject/testProject.csproj b/__tests__/project/default/xunit/testProject/testProject.csproj index 1fe3e117..8bbe2707 100644 --- a/__tests__/project/default/xunit/testProject/testProject.csproj +++ b/__tests__/project/default/xunit/testProject/testProject.csproj @@ -3,6 +3,7 @@ netcoreapp2.1 $(TargetFrameworks);net461 + $(NoWarn);CS1591;SA1600 false diff --git a/__tests__/project/space/testProject.csproj b/__tests__/project/space/testProject.csproj index ede56224..d72177f3 100644 --- a/__tests__/project/space/testProject.csproj +++ b/__tests__/project/space/testProject.csproj @@ -3,6 +3,7 @@ netcoreapp2.1 $(TargetFrameworks);net461 + $(NoWarn);CS1591;SA1600 false diff --git a/src/project/templates/Cake.Template.Tests/Cake.Template.Tests.csproj.tmpl b/src/project/templates/Cake.Template.Tests/Cake.Template.Tests.csproj.tmpl index 0bce20f9..1b4f29e7 100644 --- a/src/project/templates/Cake.Template.Tests/Cake.Template.Tests.csproj.tmpl +++ b/src/project/templates/Cake.Template.Tests/Cake.Template.Tests.csproj.tmpl @@ -1,11 +1,15 @@ - +<% + let warnings = "$(NoWarn);CS1591;SA1600"; + if (licenseType === "Unlicense" || licenseType === "WTFPL") { + warnings += ";SA1633"; + } +%> netcoreapp2.1 $(TargetFrameworks);net461 -<% if (licenseType === "Unlicense" || licenseType === "WTFPL") { -%> - $(NoWarn);SA1633 -<% } %> + <%= warnings %> + false