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

Commit

Permalink
Merge pull request #2 from justaprogrammer/code-in-title
Browse files Browse the repository at this point in the history
Adding the code to the title
  • Loading branch information
StanleyGoldman authored Oct 29, 2018
2 parents 2a46095 + dcba6b3 commit 505a0bf
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 16 deletions.
26 changes: 13 additions & 13 deletions src/BCC.MSBuildLog.Tests/Services/BinaryLogProcessorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public void Should_TestConsoleApp1_Warning()
logData.Annotations.Should().AllBeEquivalentTo(
new Annotation(
"TestConsoleApp1/Program.cs",
CheckWarningLevel.Warning, "CS0219",
"The variable 'hello' is assigned but its value is never used",
CheckWarningLevel.Warning, "CS0219",
"CS0219: The variable 'hello' is assigned but its value is never used",
13, 13)
);
}
Expand Down Expand Up @@ -73,7 +73,7 @@ public void Should_TestConsoleApp1_Warning_ConfigureAs_Warning_For_Other_Code()
new Annotation(
"TestConsoleApp1/Program.cs",
CheckWarningLevel.Warning, "CS0219",
"The variable 'hello' is assigned but its value is never used",
"CS0219: The variable 'hello' is assigned but its value is never used",
13, 13)
);
}
Expand Down Expand Up @@ -102,7 +102,7 @@ public void Should_TestConsoleApp1_Warning_ConfigureAs_Warning()
new Annotation(
"TestConsoleApp1/Program.cs",
CheckWarningLevel.Warning, "CS0219",
"The variable 'hello' is assigned but its value is never used",
"CS0219: The variable 'hello' is assigned but its value is never used",
13, 13)
);
}
Expand Down Expand Up @@ -131,7 +131,7 @@ public void Should_TestConsoleApp1_Warning_ConfigureAs_Notice()
new Annotation(
"TestConsoleApp1/Program.cs",
CheckWarningLevel.Notice, "CS0219",
"The variable 'hello' is assigned but its value is never used",
"CS0219: The variable 'hello' is assigned but its value is never used",
13, 13)
);
}
Expand Down Expand Up @@ -160,7 +160,7 @@ public void Should_TestConsoleApp1_Warning_ConfigureAs_Error()
new Annotation(
"TestConsoleApp1/Program.cs",
CheckWarningLevel.Failure, "CS0219",
"The variable 'hello' is assigned but its value is never used",
"CS0219: The variable 'hello' is assigned but its value is never used",
13, 13)
);
}
Expand Down Expand Up @@ -197,8 +197,8 @@ public void Should_TestConsoleApp1_Error()
logData.Annotations.Should().AllBeEquivalentTo(
new Annotation(
"TestConsoleApp1/Program.cs",
CheckWarningLevel.Failure, "CS1002",
"; expected",
CheckWarningLevel.Failure, "CS1002",
"CS1002: ; expected",
13, 13)
);
}
Expand All @@ -216,7 +216,7 @@ public void Should_TestConsoleApp1_CodeAnalysis()
new Annotation(
"TestConsoleApp1/Program.cs",
CheckWarningLevel.Warning, "CA2213",
"Microsoft.Usage : 'Program.MyClass' contains field 'Program.MyClass._inner' that is of IDisposable type: 'Program.MyOTherClass'. Change the Dispose method on 'Program.MyClass' to call Dispose or Close on this field.",
"CA2213: Microsoft.Usage : 'Program.MyClass' contains field 'Program.MyClass._inner' that is of IDisposable type: 'Program.MyOTherClass'. Change the Dispose method on 'Program.MyClass' to call Dispose or Close on this field.",
20, 20)
);
}
Expand All @@ -236,14 +236,14 @@ public void Should_MSBLOC()
new Annotation(
"MSBLOC.Core.Tests/Services/BinaryLogProcessorTests.cs",
CheckWarningLevel.Warning,"CS0219",
"The variable 'filename' is assigned but its value is never used",
"CS0219: The variable 'filename' is assigned but its value is never used",
56, 56));

logData.Annotations[1].Should().BeEquivalentTo(
new Annotation(
"MSBLOC.Core.Tests/Services/BinaryLogProcessorTests.cs",
CheckWarningLevel.Warning,"CS0219",
"The variable 'filename' is assigned but its value is never used",
"CS0219: The variable 'filename' is assigned but its value is never used",
83, 83));
}

Expand All @@ -262,14 +262,14 @@ public void Should_Parse_OctokitGraphQL()
new Annotation(
"Octokit.GraphQL.Core/Connection.cs",
CheckWarningLevel.Warning,"CS1591",
"Missing XML comment for publicly visible type or member 'Connection.Uri'",
"CS1591: Missing XML comment for publicly visible type or member 'Connection.Uri'",
43, 43));

logData.Annotations[1].Should().BeEquivalentTo(
new Annotation(
"Octokit.GraphQL.Core/Connection.cs",
CheckWarningLevel.Warning,"CS1591",
"Missing XML comment for publicly visible type or member 'Connection.CredentialStore'",
"CS1591: Missing XML comment for publicly visible type or member 'Connection.CredentialStore'",
44, 44));
}
[Fact]
Expand Down
6 changes: 3 additions & 3 deletions src/BCC.MSBuildLog.Tests/Services/BuildLogProcessorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public void Should_Create_CheckRun_TestConsoleApp1_Warning()
new Annotation(
"TestConsoleApp1/Program.cs",
CheckWarningLevel.Warning, "CS0219",
"The variable 'hello' is assigned but its value is never used",
"CS0219: The variable 'hello' is assigned but its value is never used",
13, 13)
};

Expand All @@ -241,7 +241,7 @@ public void Should_Create_CheckRun_TestConsoleApp1_Error()
new Annotation(
"TestConsoleApp1/Program.cs",
CheckWarningLevel.Failure, "CS1002",
"; expected",
"CS1002: ; expected",
13, 13)
};

Expand All @@ -265,7 +265,7 @@ public void Should_Create_CheckRun_TestConsoleApp1_CodeAnalysis()
new Annotation(
"TestConsoleApp1/Program.cs",
CheckWarningLevel.Warning, "CA2213",
"Microsoft.Usage : 'Program.MyClass' contains field 'Program.MyClass._inner' that is of IDisposable type: 'Program.MyOTherClass'. Change the Dispose method on 'Program.MyClass' to call Dispose or Close on this field.",
"CA2213: Microsoft.Usage : 'Program.MyClass' contains field 'Program.MyClass._inner' that is of IDisposable type: 'Program.MyOTherClass'. Change the Dispose method on 'Program.MyClass' to call Dispose or Close on this field.",
20, 20)
};

Expand Down
6 changes: 6 additions & 0 deletions src/BCC.MSBuildLog.v3.ncrunchsolution
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<SolutionConfiguration>
<Settings>
<AllowParallelTestExecution>True</AllowParallelTestExecution>
<SolutionConfigured>True</SolutionConfigured>
</Settings>
</SolutionConfiguration>
2 changes: 2 additions & 0 deletions src/BCC.MSBuildLog/Services/BinaryLogProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ public LogData ProcessLog(string binLogPath, string cloneRoot, CheckRunConfigura
}
}

message = $"{buildCode}: {message}";

ReportAs reportAs = ReportAs.AsIs;
if (ruleDictionary?.TryGetValue(buildCode, out reportAs) ?? false)
{
Expand Down

0 comments on commit 505a0bf

Please sign in to comment.