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

Commit

Permalink
Merge branch 'release/0.3.0' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalberger committed May 15, 2017
2 parents 76aac12 + 7f0d3e3 commit 14ee5e6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions nuspec/nuget/Cake.Prca.Issues.DocFx.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<copyright>Copyright © 2017 BBT Software AG, Root/Zermatt, Switzerland</copyright>
<tags>Cake Script PullRequest CodeAnalysis Cake-Prca-IssueProvider Markdown DocFx</tags>
<releaseNotes>https://github.com/cake-contrib/Cake.Prca.Issues.DocFx/releases/tag/0.3.0</releaseNotes>
</metadata>
<files>
<file src="Cake.Prca.Issues.DocFx.dll" target="lib\net45" />
Expand Down
16 changes: 10 additions & 6 deletions src/Cake.Prca.Issues.DocFx/DocFxIssuesProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,21 @@ protected override IEnumerable<ICodeAnalysisIssue> InternalReadIssues(PrcaCommen
{
return
from logEntry in this.settings.LogFileContent.Split(new[] { '{', '}' }, StringSplitOptions.RemoveEmptyEntries).Select(x => "{" + x + "}")
let
logEntryObject = JsonConvert.DeserializeObject<JToken>(logEntry)
let logEntryObject = JsonConvert.DeserializeObject<JToken>(logEntry)
let severity = (string)logEntryObject.SelectToken("message_severity")
let file = (string)logEntryObject.SelectToken("file")
let message = (string)logEntryObject.SelectToken("message")
let source = (string)logEntryObject.SelectToken("source") ?? "DocFx"
where
(string)logEntryObject.SelectToken("message_severity") == "warning"
severity == "warning" &&
!string.IsNullOrWhiteSpace(message)
select
new CodeAnalysisIssue<DocFxIssuesProvider>(
(string)logEntryObject.SelectToken("file"),
file,
null,
(string)logEntryObject.SelectToken("message"),
message,
0,
(string)logEntryObject.SelectToken("source"));
source);
}
}
}

0 comments on commit 14ee5e6

Please sign in to comment.