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

Commit

Permalink
Merge branch 'release/0.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalberger committed Jun 4, 2018
2 parents a2a1fbc + a84606a commit cce0048
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 40 deletions.
2 changes: 1 addition & 1 deletion nuspec/nuget/Cake.Issues.DocFx.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ See the Project Site for an overview of the whole ecosystem of addins for workin
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<copyright>Copyright © BBT Software AG and contributors</copyright>
<tags>Cake Script Cake-Issues Cake-IssueProvider CodeAnalysis Linting DocFx</tags>
<releaseNotes>https://github.com/cake-contrib/Cake.Issues.DocFx/releases/tag/0.2.0</releaseNotes>
<releaseNotes>https://github.com/cake-contrib/Cake.Issues.DocFx/releases/tag/0.3.0</releaseNotes>
</metadata>
<files>
<file src="Cake.Issues.DocFx.dll" target="lib\net46" />
Expand Down
18 changes: 9 additions & 9 deletions src/Cake.Issues.DocFx.Tests/Cake.Issues.DocFx.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@
<CodeAnalysisRuleSet>..\Cake.Issues.DocFx.Tests.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="Cake.Core, Version=0.26.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Cake.Core.0.26.0\lib\net46\Cake.Core.dll</HintPath>
<Reference Include="Cake.Core, Version=0.28.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Cake.Core.0.28.0\lib\net46\Cake.Core.dll</HintPath>
</Reference>
<Reference Include="Cake.Issues, Version=0.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Cake.Issues.0.2.0\lib\netstandard2.0\Cake.Issues.dll</HintPath>
<Reference Include="Cake.Issues, Version=0.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Cake.Issues.0.3.0\lib\netstandard2.0\Cake.Issues.dll</HintPath>
</Reference>
<Reference Include="Cake.Issues.Testing, Version=0.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Cake.Issues.Testing.0.2.0\lib\netstandard2.0\Cake.Issues.Testing.dll</HintPath>
<Reference Include="Cake.Issues.Testing, Version=0.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Cake.Issues.Testing.0.3.0\lib\netstandard2.0\Cake.Issues.Testing.dll</HintPath>
</Reference>
<Reference Include="Cake.Testing, Version=0.26.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Cake.Testing.0.26.0\lib\net46\Cake.Testing.dll</HintPath>
<Reference Include="Cake.Testing, Version=0.28.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Cake.Testing.0.28.0\lib\net46\Cake.Testing.dll</HintPath>
</Reference>
<Reference Include="Shouldly, Version=3.0.0.0, Culture=neutral, PublicKeyToken=6042cbcb05cbc941, processorArchitecture=MSIL">
<HintPath>..\packages\Shouldly.3.0.0\lib\net451\Shouldly.dll</HintPath>
Expand Down Expand Up @@ -100,7 +100,7 @@
<ItemGroup>
<Analyzer Include="..\packages\StyleCop.Analyzers.1.0.2\analyzers\dotnet\cs\StyleCop.Analyzers.CodeFixes.dll" />
<Analyzer Include="..\packages\StyleCop.Analyzers.1.0.2\analyzers\dotnet\cs\StyleCop.Analyzers.dll" />
<Analyzer Include="..\packages\xunit.analyzers.0.8.0\analyzers\dotnet\cs\xunit.analyzers.dll" />
<Analyzer Include="..\packages\xunit.analyzers.0.9.0\analyzers\dotnet\cs\xunit.analyzers.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
Expand Down
11 changes: 9 additions & 2 deletions src/Cake.Issues.DocFx.Tests/DocFxProviderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ public void Should_Read_Issue_Correct(string docRootPath, string docRelativePath
null,
"Build Document.LinkPhaseHandler.Apply Templates",
null,
0,
300,
"Warning",
"Invalid cross reference \"[Foo](xref:foo)\".");
}

Expand All @@ -83,7 +84,8 @@ public void Should_Read_Line_Correct()
45,
"Build Document.LinkPhaseHandler.ConceptualDocumentProcessor.Save",
null,
0,
300,
"Warning",
"Invalid file link:(~/foo.md).");
}

Expand All @@ -94,8 +96,12 @@ private static void CheckIssue(
string rule,
string ruleUrl,
int priority,
string priorityName,
string message)
{
issue.ProviderType.ShouldBe("Cake.Issues.DocFx.DocFxIssuesProvider");
issue.ProviderName.ShouldBe("DocFX");

if (issue.AffectedFileRelativePath == null)
{
affectedFileRelativePath.ShouldBeNull();
Expand All @@ -119,6 +125,7 @@ private static void CheckIssue(
}

issue.Priority.ShouldBe(priority);
issue.PriorityName.ShouldBe(priorityName);
issue.Message.ShouldBe(message);
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/Cake.Issues.DocFx.Tests/packages.config
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Cake.Core" version="0.26.0" targetFramework="net46" />
<package id="Cake.Issues" version="0.2.0" targetFramework="net461" />
<package id="Cake.Issues.Testing" version="0.2.0" targetFramework="net461" />
<package id="Cake.Testing" version="0.26.0" targetFramework="net46" />
<package id="Cake.Core" version="0.28.0" targetFramework="net461" />
<package id="Cake.Issues" version="0.3.0" targetFramework="net461" />
<package id="Cake.Issues.Testing" version="0.3.0" targetFramework="net461" />
<package id="Cake.Testing" version="0.28.0" targetFramework="net461" />
<package id="Shouldly" version="3.0.0" targetFramework="net46" />
<package id="StyleCop.Analyzers" version="1.0.2" targetFramework="net46" developmentDependency="true" />
<package id="xunit" version="2.3.1" targetFramework="net46" />
<package id="xunit.abstractions" version="2.0.1" targetFramework="net46" />
<package id="xunit.analyzers" version="0.8.0" targetFramework="net46" />
<package id="xunit.analyzers" version="0.9.0" targetFramework="net461" />
<package id="xunit.assert" version="2.3.1" targetFramework="net46" />
<package id="xunit.core" version="2.3.1" targetFramework="net46" />
<package id="xunit.extensibility.core" version="2.3.1" targetFramework="net46" />
Expand Down
23 changes: 12 additions & 11 deletions src/Cake.Issues.DocFx/Cake.Issues.DocFx.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,18 @@
<CodeAnalysisRuleSet>..\Cake.Issues.DocFx.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="Cake.Core, Version=0.26.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Cake.Core.0.26.0\lib\net46\Cake.Core.dll</HintPath>
<Reference Include="Cake.Core, Version=0.28.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Cake.Core.0.28.0\lib\net46\Cake.Core.dll</HintPath>
</Reference>
<Reference Include="Cake.Issues, Version=0.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Cake.Issues.0.2.0\lib\netstandard2.0\Cake.Issues.dll</HintPath>
<Reference Include="Cake.Issues, Version=0.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Cake.Issues.0.3.0\lib\netstandard2.0\Cake.Issues.dll</HintPath>
</Reference>
<Reference Include="Costura, Version=2.0.1.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
<HintPath>..\packages\Costura.Fody.2.0.1\lib\net452\Costura.dll</HintPath>
<Reference Include="Costura, Version=1.6.2.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
<HintPath>..\packages\Costura.Fody.1.6.2\lib\dotnet\Costura.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down Expand Up @@ -91,13 +92,13 @@
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Fody.3.0.3\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.3.0.3\build\Fody.targets'))" />
<Error Condition="!Exists('..\packages\Costura.Fody.2.0.1\build\Costura.Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.2.0.1\build\Costura.Fody.targets'))" />
<Error Condition="!Exists('..\packages\Microsoft.CodeQuality.Analyzers.2.6.0\build\Microsoft.CodeQuality.Analyzers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeQuality.Analyzers.2.6.0\build\Microsoft.CodeQuality.Analyzers.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.NetCore.Analyzers.2.6.0\build\Microsoft.NetCore.Analyzers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.NetCore.Analyzers.2.6.0\build\Microsoft.NetCore.Analyzers.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.NetFramework.Analyzers.2.6.0\build\Microsoft.NetFramework.Analyzers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.NetFramework.Analyzers.2.6.0\build\Microsoft.NetFramework.Analyzers.props'))" />
<Error Condition="!Exists('..\packages\Text.Analyzers.2.6.0\build\Text.Analyzers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Text.Analyzers.2.6.0\build\Text.Analyzers.props'))" />
<Error Condition="!Exists('..\packages\Fody.2.5.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.2.5.0\build\Fody.targets'))" />
<Error Condition="!Exists('..\packages\Costura.Fody.1.6.2\build\dotnet\Costura.Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.1.6.2\build\dotnet\Costura.Fody.targets'))" />
</Target>
<Import Project="..\packages\Fody.3.0.3\build\Fody.targets" Condition="Exists('..\packages\Fody.3.0.3\build\Fody.targets')" />
<Import Project="..\packages\Costura.Fody.2.0.1\build\Costura.Fody.targets" Condition="Exists('..\packages\Costura.Fody.2.0.1\build\Costura.Fody.targets')" />
<Import Project="..\packages\Fody.2.5.0\build\Fody.targets" Condition="Exists('..\packages\Fody.2.5.0\build\Fody.targets')" />
<Import Project="..\packages\Costura.Fody.1.6.2\build\dotnet\Costura.Fody.targets" Condition="Exists('..\packages\Costura.Fody.1.6.2\build\dotnet\Costura.Fody.targets')" />
</Project>
2 changes: 1 addition & 1 deletion src/Cake.Issues.DocFx/DocFxIssuesAliases.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static string DocFxIssuesProviderTypeName(
{
context.NotNull(nameof(context));

return Issue<DocFxIssuesProvider>.GetProviderTypeName();
return typeof(DocFxIssuesProvider).FullName;
}

/// <summary>
Expand Down
15 changes: 9 additions & 6 deletions src/Cake.Issues.DocFx/DocFxIssuesProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public DocFxIssuesProvider(ICakeLog log, DocFxIssuesSettings settings)
this.settings = settings;
}

/// <inheritdoc />
public override string ProviderName => "DocFX";

/// <inheritdoc />
protected override IEnumerable<IIssue> InternalReadIssues(IssueCommentFormat format)
{
Expand All @@ -50,12 +53,12 @@ from logEntry in this.settings.LogFileContent.Split(new[] { '{', '}' }, StringSp
severity == "warning" &&
!string.IsNullOrWhiteSpace(message)
select
new Issue<DocFxIssuesProvider>(
file,
line,
message,
0,
source);
IssueBuilder
.NewIssue(message, this)
.InFile(file, line)
.OfRule(source)
.WithPriority(IssuePriority.Warning)
.Create();
}

/// <summary>
Expand Down
10 changes: 5 additions & 5 deletions src/Cake.Issues.DocFx/packages.config
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Cake.Core" version="0.26.0" targetFramework="net46" />
<package id="Cake.Issues" version="0.2.0" targetFramework="net461" />
<package id="Costura.Fody" version="2.0.1" targetFramework="net461" developmentDependency="true" />
<package id="Fody" version="3.0.3" targetFramework="net461" developmentDependency="true" />
<package id="Cake.Core" version="0.28.0" targetFramework="net461" />
<package id="Cake.Issues" version="0.3.0" targetFramework="net461" />
<package id="Costura.Fody" version="1.6.2" targetFramework="net461" developmentDependency="true" />
<package id="Fody" version="2.5.0" targetFramework="net461" developmentDependency="true" />
<package id="Microsoft.CodeAnalysis.FxCopAnalyzers" version="2.6.0" targetFramework="net461" developmentDependency="true" />
<package id="Microsoft.CodeQuality.Analyzers" version="2.6.0" targetFramework="net461" developmentDependency="true" />
<package id="Microsoft.NetCore.Analyzers" version="2.6.0" targetFramework="net461" developmentDependency="true" />
<package id="Microsoft.NetFramework.Analyzers" version="2.6.0" targetFramework="net461" developmentDependency="true" />
<package id="Newtonsoft.Json" version="11.0.1" targetFramework="net46" />
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
<package id="StyleCop.Analyzers" version="1.0.2" targetFramework="net46" developmentDependency="true" />
<package id="Text.Analyzers" version="2.6.0" targetFramework="net461" developmentDependency="true" />
</packages>

0 comments on commit cce0048

Please sign in to comment.