Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release/4.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalberger committed Dec 23, 2023
2 parents a1af58b + 127451e commit 4104bee
Show file tree
Hide file tree
Showing 20 changed files with 200 additions and 83 deletions.
5 changes: 3 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ install:
- ps: mkdir $env:DOTNET_INSTALL_DIR -Force | Out-Null
- ps: Invoke-WebRequest -Uri "https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.ps1" -OutFile "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1"
- ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 5.0.408 -InstallDir $env:DOTNET_INSTALL_DIR'
- ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 6.0.405 -InstallDir $env:DOTNET_INSTALL_DIR'
- ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 7.0.102 -InstallDir $env:DOTNET_INSTALL_DIR'
- ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 6.0.417 -InstallDir $env:DOTNET_INSTALL_DIR'
- ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 7.0.404 -InstallDir $env:DOTNET_INSTALL_DIR'
- ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 8.0.100 -InstallDir $env:DOTNET_INSTALL_DIR'
- ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path"
- ps: dotnet --info

Expand Down
21 changes: 0 additions & 21 deletions .github/dependabot.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>cake-contrib/renovate-presets:cake-issues"
]
}
28 changes: 28 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ jobs:
inputs:
version: '7.x'
displayName: 'Install .NET 7'
- task: UseDotNet@2
inputs:
version: '8.x'
displayName: 'Install .NET 8'
- powershell: ./build.ps1
displayName: 'Cake Build'
- publish: $(Build.SourcesDirectory)/BuildArtifacts/Packages/NuGet
Expand All @@ -40,6 +44,10 @@ jobs:
pool:
vmImage: 'windows-2019'
steps:
- task: UseDotNet@2
inputs:
version: '6.x'
displayName: 'Install .NET 6'
- task: NodeTool@0
inputs:
versionSpec: '18.x'
Expand Down Expand Up @@ -67,6 +75,10 @@ jobs:
pool:
vmImage: 'windows-2019'
steps:
- task: UseDotNet@2
inputs:
version: '6.x'
displayName: 'Install .NET 6'
- task: NodeTool@0
inputs:
versionSpec: '18.x'
Expand Down Expand Up @@ -94,6 +106,10 @@ jobs:
pool:
vmImage: 'macOS-11'
steps:
- task: UseDotNet@2
inputs:
version: '6.x'
displayName: 'Install .NET 6'
- task: NodeTool@0
inputs:
versionSpec: '18.x'
Expand Down Expand Up @@ -122,6 +138,10 @@ jobs:
pool:
vmImage: 'macOS-13'
steps:
- task: UseDotNet@2
inputs:
version: '6.x'
displayName: 'Install .NET 6'
- task: NodeTool@0
inputs:
versionSpec: '18.x'
Expand Down Expand Up @@ -150,6 +170,10 @@ jobs:
pool:
vmImage: 'ubuntu-20.04'
steps:
- task: UseDotNet@2
inputs:
version: '6.x'
displayName: 'Install .NET 6'
- task: NodeTool@0
inputs:
versionSpec: '18.x'
Expand Down Expand Up @@ -178,6 +202,10 @@ jobs:
pool:
vmImage: 'ubuntu-22.04'
steps:
- task: UseDotNet@2
inputs:
version: '6.x'
displayName: 'Install .NET 6'
- task: NodeTool@0
inputs:
versionSpec: '16.x'
Expand Down
7 changes: 7 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"sdk": {
"allowPrerelease": true,
"version": "8.0.100",
"rollForward": "latestFeature"
}
}
5 changes: 4 additions & 1 deletion nuspec/nuget/Cake.Issues.Markdownlint.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ See the Project Site for an overview of the whole ecosystem of addins for workin
<repository type="git" url="https://github.com/cake-contrib/Cake.Issues.Markdownlint.git"/>
<copyright>Copyright © BBT Software AG and contributors</copyright>
<tags>cake cake-addin cake-issues cake-issueprovider linting markdown markdownlint</tags>
<releaseNotes>https://github.com/cake-contrib/Cake.Issues.Markdownlint/releases/tag/3.0.0</releaseNotes>
<releaseNotes>https://github.com/cake-contrib/Cake.Issues.Markdownlint/releases/tag/4.0.0</releaseNotes>
</metadata>
<files>
<file src="..\..\..\..\nuspec\nuget\icon.png" target="" />
Expand All @@ -34,5 +34,8 @@ See the Project Site for an overview of the whole ecosystem of addins for workin
<file src="net7.0/Cake.Issues.Markdownlint.dll" target="lib\net7.0" />
<file src="net7.0/Cake.Issues.Markdownlint.pdb" target="lib\net7.0" />
<file src="net7.0/Cake.Issues.Markdownlint.xml" target="lib\net7.0" />
<file src="net8.0/Cake.Issues.Markdownlint.dll" target="lib\net8.0" />
<file src="net8.0/Cake.Issues.Markdownlint.pdb" target="lib\net8.0" />
<file src="net8.0/Cake.Issues.Markdownlint.xml" target="lib\net8.0" />
</files>
</package>
2 changes: 1 addition & 1 deletion recipe.cake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#load nuget:?package=Cake.Recipe&version=3.0.1
#load nuget:?package=Cake.Recipe&version=3.1.1

//*************************************************************************************************
// Settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<None Remove="Testfiles\MarkdownlintCliJsonLogFileFormat\MD025.json" />
<None Remove="Testfiles\MarkdownlintCliJsonLogFileFormat\MD034.json" />
<None Remove="Testfiles\MarkdownlintCliLogFileFormat\empty.log" />
<None Remove="Testfiles\MarkdownlintCliLogFileFormat\markdownlint-cli-0.35.0.log" />
<None Remove="Testfiles\MarkdownlintCliLogFileFormat\markdownlint-cli-0.8.1.log" />
<None Remove="Testfiles\MarkdownlintCliLogFileFormat\markdownlint-cli-0.10.0.log" />
<None Remove="Testfiles\MarkdownlintCliLogFileFormat\markdownlint-cli-0.19.0.log" />
Expand All @@ -41,6 +42,7 @@
<EmbeddedResource Include="Testfiles\MarkdownlintCliJsonLogFileFormat\MD025.json" />
<EmbeddedResource Include="Testfiles\MarkdownlintCliJsonLogFileFormat\MD034.json" />
<EmbeddedResource Include="Testfiles\MarkdownlintCliLogFileFormat\empty.log" />
<EmbeddedResource Include="Testfiles\MarkdownlintCliLogFileFormat\markdownlint-cli-0.35.0.log" />
<EmbeddedResource Include="Testfiles\MarkdownlintCliLogFileFormat\markdownlint-cli-0.8.1.log" />
<EmbeddedResource Include="Testfiles\MarkdownlintCliLogFileFormat\markdownlint-cli-0.10.0.log" />
<EmbeddedResource Include="Testfiles\MarkdownlintCliLogFileFormat\markdownlint-cli-0.19.0.log" />
Expand All @@ -52,28 +54,28 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Cake.Issues">
<Version>3.0.0</Version>
<Version>4.0.0</Version>
</PackageReference>
<PackageReference Include="Cake.Issues.Testing">
<Version>3.0.0</Version>
<Version>4.0.0</Version>
</PackageReference>
<PackageReference Include="Cake.Testing">
<Version>3.0.0</Version>
<Version>4.0.0</Version>
</PackageReference>
<PackageReference Include="Shouldly">
<Version>4.1.0</Version>
<Version>4.2.1</Version>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers">
<Version>1.1.118</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit">
<Version>2.4.2</Version>
<Version>2.6.3</Version>
</PackageReference>
<PackageReference Include="xunit.runner.visualstudio">
<Version>2.4.5</Version>
<Version>2.5.5</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,104 @@ public void Should_Read_Issue_Correct_0_22_0()
.OfRule("MD047", new Uri("https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md047"))
.WithPriority(IssuePriority.Warning));
}

[Fact]
public void Should_Read_Issue_Correct_0_35_0()
{
// Given
var fixture =
new MarkdownlintIssuesProviderFixture<MarkdownlintCliLogFileFormat>("markdownlint-cli-0.35.0.log")
{
ReadIssuesSettings = new ReadIssuesSettings("C:/git/github/cake-contrib/Cake.Issues.Markdownlint/tests"),
};

// When
var issues = fixture.ReadIssues().ToList();

// Then
issues.Count.ShouldBe(9);
IssueChecker.Check(
issues[0],
IssueBuilder.NewIssue(
"Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: \"# foo\"]",
"Cake.Issues.Markdownlint.MarkdownlintIssuesProvider",
"markdownlint")
.InFile("docs/index.md", 1)
.OfRule("MD022", new Uri("https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md022"))
.WithPriority(IssuePriority.Warning));
IssueChecker.Check(
issues[1],
IssueBuilder.NewIssue(
"Trailing spaces [Expected: 0 or 2; Actual: 1]",
"Cake.Issues.Markdownlint.MarkdownlintIssuesProvider",
"markdownlint")
.InFile("docs/index.md", 2, 811)
.OfRule("MD009", new Uri("https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md009"))
.WithPriority(IssuePriority.Warning));
IssueChecker.Check(
issues[2],
IssueBuilder.NewIssue(
"Line length [Expected: 80; Actual: 811]",
"Cake.Issues.Markdownlint.MarkdownlintIssuesProvider",
"markdownlint")
.InFile("docs/index.md", 2, 81)
.OfRule("MD013", new Uri("https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md013"))
.WithPriority(IssuePriority.Warning));
IssueChecker.Check(
issues[3],
IssueBuilder.NewIssue(
"Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: \"# bar\"]",
"Cake.Issues.Markdownlint.MarkdownlintIssuesProvider",
"markdownlint")
.InFile("docs/index.md", 4)
.OfRule("MD022", new Uri("https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md022"))
.WithPriority(IssuePriority.Warning));
IssueChecker.Check(
issues[4],
IssueBuilder.NewIssue(
"Multiple top-level headings in the same document [Context: \"# bar\"]",
"Cake.Issues.Markdownlint.MarkdownlintIssuesProvider",
"markdownlint")
.InFile("docs/index.md", 4)
.OfRule("MD025", new Uri("https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md025"))
.WithPriority(IssuePriority.Warning));
IssueChecker.Check(
issues[5],
IssueBuilder.NewIssue(
"Fenced code blocks should be surrounded by blank lines [Context: \"```\"]",
"Cake.Issues.Markdownlint.MarkdownlintIssuesProvider",
"markdownlint")
.InFile("docs/index.md", 5)
.OfRule("MD031", new Uri("https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md031"))
.WithPriority(IssuePriority.Warning));
IssueChecker.Check(
issues[6],
IssueBuilder.NewIssue(
"Fenced code blocks should have a language specified [Context: \"```\"]",
"Cake.Issues.Markdownlint.MarkdownlintIssuesProvider",
"markdownlint")
.InFile("docs/index.md", 5)
.OfRule("MD040", new Uri("https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md040"))
.WithPriority(IssuePriority.Warning));
IssueChecker.Check(
issues[7],
IssueBuilder.NewIssue(
"Line length [Expected: 80; Actual: 840]",
"Cake.Issues.Markdownlint.MarkdownlintIssuesProvider",
"markdownlint")
.InFile("docs/index.md", 6, 81)
.OfRule("MD013", new Uri("https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md013"))
.WithPriority(IssuePriority.Warning));
IssueChecker.Check(
issues[8],
IssueBuilder.NewIssue(
"Files should end with a single newline character",
"Cake.Issues.Markdownlint.MarkdownlintIssuesProvider",
"markdownlint")
.InFile("docs/index.md", 7, 3)
.OfRule("MD047", new Uri("https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md047"))
.WithPriority(IssuePriority.Warning));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public void Should_Set_LogFileContent()
public void Should_Set_LogFileContent_If_Empty()
{
// Given
byte[] logFileContent = Array.Empty<byte>();
byte[] logFileContent = [];
var format = new MarkdownlintV1LogFileFormat(new FakeLog());

// When
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
C:\git\github\cake-contrib\Cake.Issues.Markdownlint\tests\docs\index.md:1 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "# foo"]
C:\git\github\cake-contrib\Cake.Issues.Markdownlint\tests\docs\index.md:2:811 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
C:\git\github\cake-contrib\Cake.Issues.Markdownlint\tests\docs\index.md:2:81 MD013/line-length Line length [Expected: 80; Actual: 811]
C:\git\github\cake-contrib\Cake.Issues.Markdownlint\tests\docs\index.md:4 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "# bar"]
C:\git\github\cake-contrib\Cake.Issues.Markdownlint\tests\docs\index.md:4 MD025/single-title/single-h1 Multiple top-level headings in the same document [Context: "# bar"]
C:\git\github\cake-contrib\Cake.Issues.Markdownlint\tests\docs\index.md:5 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```"]
C:\git\github\cake-contrib\Cake.Issues.Markdownlint\tests\docs\index.md:5 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
C:\git\github\cake-contrib\Cake.Issues.Markdownlint\tests\docs\index.md:6:81 MD013/line-length Line length [Expected: 80; Actual: 840]
C:\git\github\cake-contrib\Cake.Issues.Markdownlint\tests\docs\index.md:7:3 MD047/single-trailing-newline Files should end with a single newline character
10 changes: 5 additions & 5 deletions src/Cake.Issues.Markdownlint/Cake.Issues.Markdownlint.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<Description>Markdownlint support for the Cake.Issues Addin for Cake Build Automation System</Description>
<Authors>BBT Software AG</Authors>
<Company>BBT Software AG</Company>
Expand All @@ -26,12 +26,12 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Cake.Core">
<Version>3.0.0</Version>
<Version>4.0.0</Version>
</PackageReference>
<PackageReference Include="Cake.Issues">
<Version>3.0.0</Version>
<Version>4.0.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.0">
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 0 additions & 2 deletions src/Cake.Issues.Markdownlint/IssueDataContract.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#pragma warning disable SA1401 // Fields must be private
#pragma warning disable SA1307 // Accessible fields must begin with upper-case letter
#pragma warning disable SA1402 // File may only contain a single class
#pragma warning disable SA1600 // Elements must be documented
#pragma warning disable SA1649 // File name must match first type name

Expand Down Expand Up @@ -34,7 +33,6 @@ internal class Issue
}
#pragma warning restore SA1401 // Fields must be private
#pragma warning restore SA1307 // Accessible fields must begin with upper-case letter
#pragma warning restore SA1402 // File may only contain a single class
#pragma warning restore SA1600 // Elements must be documented
#pragma warning restore SA1649 // File name must match first type name
}
Loading

0 comments on commit 4104bee

Please sign in to comment.