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

Commit

Permalink
Update to Cake.Issues 0.3.0-beta.4
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalberger committed Jun 3, 2018
1 parent 8671ea3 commit ba8b88b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 31 deletions.
Expand Up @@ -34,8 +34,8 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.2" />
<PackageReference Include="Cake.Core" Version="0.28.0" />
<PackageReference Include="Cake.Testing" Version="0.28.0" />
<PackageReference Include="Cake.Issues" Version="0.3.0-beta0002" />
<PackageReference Include="Cake.Issues.Testing" Version="0.3.0-beta0002" />
<PackageReference Include="Cake.Issues" Version="0.3.0-beta0004" />
<PackageReference Include="Cake.Issues.Testing" Version="0.3.0-beta0004" />
<PackageReference Include="Shouldly" Version="3.0.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.0.2" />
<PackageReference Include="xunit" Version="2.3.1" />
Expand Down
2 changes: 1 addition & 1 deletion src/Cake.Issues.MsBuild/Cake.Issues.MsBuild.csproj
Expand Up @@ -25,7 +25,7 @@

<ItemGroup>
<PackageReference Include="Cake.Core" Version="0.28.0" />
<PackageReference Include="Cake.Issues" Version="0.3.0-beta0002" />
<PackageReference Include="Cake.Issues" Version="0.3.0-beta0004" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.6.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.0.2" />
</ItemGroup>
Expand Down
33 changes: 5 additions & 28 deletions src/Cake.Issues.MsBuild/XmlFileLoggerFormat.cs
Expand Up @@ -64,36 +64,13 @@ public XmlFileLoggerFormat(ICakeLog log)
}

// Build issue.
var issueBuilder =
result.Add(
IssueBuilder
.NewIssue(warning.Value, issueProvider)
.WithPriority(IssuePriority.Warning);

if (!string.IsNullOrWhiteSpace(fileName))
{
if (line.HasValue)
{
issueBuilder = issueBuilder.InFile(fileName, line.Value);
}
else
{
issueBuilder = issueBuilder.InFile(fileName);
}
}

if (!string.IsNullOrWhiteSpace(rule))
{
if (ruleUrl != null)
{
issueBuilder = issueBuilder.OfRule(rule, ruleUrl);
}
else
{
issueBuilder = issueBuilder.OfRule(rule);
}
}

result.Add(issueBuilder.Create());
.WithPriority(IssuePriority.Warning)
.InFile(fileName, line)
.OfRule(rule, ruleUrl)
.Create());
}

return result;
Expand Down

0 comments on commit ba8b88b

Please sign in to comment.