-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* release/0.2.0: (21 commits) (maint) Fix incorrect label used in config (#58) Implement requirement rule CPMR0074 (#28) Add rule to disallow icon URL using GitHub links (#37) Implement note rule CPMR0068 (#36) Implement note rule CPMR0067 (maint) Set explicit PlatformTarget for console (maint) synced local '.github/ISSUE_TEMPLATE/' with remote '.github/ISSUE_TEMPLATE/' (#38) Add rule for validating ID length (#39) Add rule for validating underscore in ID (#34) Implement note rule CPMR0061 - Id Contains "." (maint) synced local '.github/PULL_REQUEST_TEMPLATE.md' with remote '.github/PULL_REQUEST_TEMPLATE.md' (build) Update Chocolatey.Cake.Recipe to latest (#35) Implement note rule CPMR0062 (build) Update to latest Recipe package (maint) synced local '.github/ISSUE_TEMPLATE/' with remote '.github/ISSUE_TEMPLATE/' (#32) Update Help URLs to short link (#29) Add missing release notes to generated packages (maint) Update extension name in Readme (maint) synced local '.templates/' with remote '.github/GitReleaseManager/.templates/' (#26) Use milestone for license URL replacement ...
- Loading branch information
Showing
118 changed files
with
869 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{{ | ||
if issue_label == "Bug" || issue_label == "Bug Fix" || issue_label == "Bug Fixes" | ||
}}- Fix - {{ issue.title }} - see [#{{ issue.number }}]({{ issue.html_url }}). | ||
}}- Fix - {{ issue.title }} - see [#{{ issue.public_number }}]({{ issue.html_url }}). | ||
{{ else | ||
}}- {{ issue.title }} - see [#{{ issue.number }}]({{ issue.html_url }}). | ||
}}- {{ issue.title }} - see [#{{ issue.public_number }}]({{ issue.html_url }}). | ||
{{ end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 8 additions & 8 deletions
16
...ion.Tests/Rules/AnyElementRulesTests.ShouldFlagAllElementsInADefaultTemplate.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...AuthorMatchesMaintainerRuleTests.ShouldFlagRuleWhenAuthorAndMaintainerIsSame.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[ | ||
{ | ||
HelpUrl: https://ch0.co/rules/cpmr0068, | ||
Id: CPMR0068, | ||
Message: The package maintainer field (owners) matches the software author field (authors) in the nuspec., | ||
Severity: Note | ||
} | ||
] |
8 changes: 8 additions & 0 deletions
8
...esMaintainerRuleTests.ShouldFlagRuleWhenAuthorAndMaintainerUsesDifferentCase.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[ | ||
{ | ||
HelpUrl: https://ch0.co/rules/cpmr0068, | ||
Id: CPMR0068, | ||
Message: The package maintainer field (owners) matches the software author field (authors) in the nuspec., | ||
Severity: Note | ||
} | ||
] |
8 changes: 8 additions & 0 deletions
8
...tchesMaintainerRuleTests.ShouldFlagRuleWhenMultipleSameAuthorsAndMaintainers.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[ | ||
{ | ||
HelpUrl: https://ch0.co/rules/cpmr0068, | ||
Id: CPMR0068, | ||
Message: The package maintainer field (owners) matches the software author field (authors) in the nuspec., | ||
Severity: Note | ||
} | ||
] |
8 changes: 8 additions & 0 deletions
8
...AuthorMatchesMaintainerRuleTests.ShouldReturnAvailableRulesForImplementation.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[ | ||
{ | ||
Severity: Note, | ||
Id: CPMR0068, | ||
Summary: The package maintainer field (owners) matches the software author field (authors) in the nuspec., | ||
HelpUrl: https://ch0.co/rules/cpmr0068 | ||
} | ||
] |
110 changes: 110 additions & 0 deletions
110
src/Chocolatey.Community.Validation.Tests/Rules/AuthorMatchesMaintainerRuleTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
namespace Chocolatey.Community.Validation.Tests.Rules | ||
{ | ||
using System.Threading.Tasks; | ||
using chocolatey; | ||
using Chocolatey.Community.Validation.Rules; | ||
using NUnit.Framework; | ||
|
||
[Category("Notes")] | ||
public class AuthorMatchesMaintainerRuleTests : RuleTestBase<AuthorMatchesMaintainerRule> | ||
{ | ||
[Test] | ||
public async Task ShouldFlagRuleWhenAuthorAndMaintainerIsSame() | ||
{ | ||
const string testContent = @"<?xml version=""1.0"" encoding=""utf-8""?> | ||
<!-- Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one. --> | ||
<package xmlns=""http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd""> | ||
<metadata> | ||
<id>short-copyright</id> | ||
<title>[Deprecated] Test PKG</title> | ||
<version>1.0.0</version> | ||
<authors>Package-Author</authors> | ||
<owners>Package-Author</owners> | ||
<packageSourceUrl>https://test-url.com/</packageSourceUrl> | ||
</metadata> | ||
<files /> | ||
</package>"; | ||
|
||
await VerifyNuspec(testContent); | ||
} | ||
[Test] | ||
public async Task ShouldFlagRuleWhenAuthorAndMaintainerUsesDifferentCase() | ||
{ | ||
const string testContent = @"<?xml version=""1.0"" encoding=""utf-8""?> | ||
<!-- Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one. --> | ||
<package xmlns=""http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd""> | ||
<metadata> | ||
<id>short-copyright</id> | ||
<title>[Deprecated] Test PKG</title> | ||
<version>1.0.0</version> | ||
<authors>Package-Author</authors> | ||
<owners>package-author</owners> | ||
<packageSourceUrl>https://test-url.com/</packageSourceUrl> | ||
</metadata> | ||
<files /> | ||
</package>"; | ||
|
||
await VerifyNuspec(testContent); | ||
} | ||
|
||
[Test] | ||
public async Task ShouldFlagRuleWhenMultipleSameAuthorsAndMaintainers() | ||
{ | ||
const string testContent = @"<?xml version=""1.0"" encoding=""utf-8""?> | ||
<!-- Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one. --> | ||
<package xmlns=""http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd""> | ||
<metadata> | ||
<id>short-copyright</id> | ||
<title>[Deprecated] Test PKG</title> | ||
<version>1.0.0</version> | ||
<authors>Package-Author Package-Maintainer</authors> | ||
<owners>Package-Author Package-Maintainer</owners> | ||
<packageSourceUrl>https://test-url.com/</packageSourceUrl> | ||
</metadata> | ||
<files /> | ||
</package>"; | ||
|
||
await VerifyNuspec(testContent); | ||
} | ||
|
||
[TestCaseSource(nameof(EmptyTestValues))] | ||
public async Task ShouldNotFlagOnEmptyValues(string value) | ||
{ | ||
const string testContent = @"<?xml version=""1.0"" encoding=""utf-8""?> | ||
<!-- Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one. --> | ||
<package xmlns=""http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd""> | ||
<metadata> | ||
<id>short-copyright</id> | ||
<title>[Deprecated] Test PKG</title> | ||
<version>1.0.0</version> | ||
<authors>{0}</authors> | ||
<owners>{0}</owners> | ||
<packageSourceUrl>https://test-url.com/</packageSourceUrl> | ||
</metadata> | ||
<files /> | ||
</package>"; | ||
|
||
await VerifyEmptyResults(testContent.FormatWith(value)); | ||
} | ||
|
||
[Test] | ||
public async Task ShouldNotFlagWhenDifferentMaintanerCountThanAuthors() | ||
{ | ||
const string testContent = @"<?xml version=""1.0"" encoding=""utf-8""?> | ||
<!-- Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one. --> | ||
<package xmlns=""http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd""> | ||
<metadata> | ||
<id>short-copyright</id> | ||
<title>[Deprecated] Test PKG</title> | ||
<version>1.0.0</version> | ||
<authors>Package-Author</authors> | ||
<owners>Package-Author Package-Maintainer</owners> | ||
<packageSourceUrl>https://test-url.com/</packageSourceUrl> | ||
</metadata> | ||
<files /> | ||
</package>"; | ||
|
||
await VerifyEmptyResults(testContent); | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...htElementRulesTests.ShouldFlagWhenCopyrightIsBelow4Characters_copyright= .verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ementRulesTests.ShouldFlagWhenCopyrightIsBelow4Characters_copyright= uba .verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tElementRulesTests.ShouldFlagWhenCopyrightIsBelow4Characters_copyright=-- -.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...yrightElementRulesTests.ShouldFlagWhenCopyrightIsBelow4Characters_copyright=.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rightElementRulesTests.ShouldFlagWhenCopyrightIsBelow4Characters_copyright=a.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ghtElementRulesTests.ShouldFlagWhenCopyrightIsBelow4Characters_copyright=abc.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...htElementRulesTests.ShouldFlagWhenCopyrightIsBelow4Characters_copyright=null.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.