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

Commit

Permalink
Other fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
StanleyGoldman committed Dec 9, 2018
1 parent a4db09d commit e609860
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
22 changes: 11 additions & 11 deletions src/BCC.MSBuildLog.Tests/Services/BinaryLogProcessorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void Should_TestConsoleApp1_Warning()
"TestConsoleApp1/Program.cs",
13,
13,
CheckWarningLevel.Warning,
AnnotationLevel.Warning,
"The variable 'hello' is assigned but its value is never used")
{
Title = "CS0219: TestConsoleApp1/Program.cs(13)"
Expand Down Expand Up @@ -81,7 +81,7 @@ public void Should_TestConsoleApp1_Warning_ConfigureAs_Warning_For_Other_Code()
"TestConsoleApp1/Program.cs",
13,
13,
CheckWarningLevel.Warning,
AnnotationLevel.Warning,
"The variable 'hello' is assigned but its value is never used")
{
Title = "CS0219: TestConsoleApp1/Program.cs(13)"
Expand Down Expand Up @@ -116,7 +116,7 @@ public void Should_TestConsoleApp1_Warning_ConfigureAs_Warning()
"TestConsoleApp1/Program.cs",
13,
13,
CheckWarningLevel.Warning,
AnnotationLevel.Warning,
"The variable 'hello' is assigned but its value is never used")
{
Title = "CS0219: TestConsoleApp1/Program.cs(13)"
Expand Down Expand Up @@ -151,7 +151,7 @@ public void Should_TestConsoleApp1_Warning_ConfigureAs_Notice()
"TestConsoleApp1/Program.cs",
13,
13,
CheckWarningLevel.Notice,
AnnotationLevel.Notice,
"The variable 'hello' is assigned but its value is never used")
{
Title = "CS0219: TestConsoleApp1/Program.cs(13)"
Expand Down Expand Up @@ -186,7 +186,7 @@ public void Should_TestConsoleApp1_Warning_ConfigureAs_Error()
"TestConsoleApp1/Program.cs",
13,
13,
CheckWarningLevel.Failure,
AnnotationLevel.Failure,
"The variable 'hello' is assigned but its value is never used")
{
Title = "CS0219: TestConsoleApp1/Program.cs(13)"
Expand Down Expand Up @@ -232,7 +232,7 @@ public void Should_TestConsoleApp1_Error()
"TestConsoleApp1/Program.cs",
13,
13,
CheckWarningLevel.Failure,
AnnotationLevel.Failure,
"; expected")
{
Title = "CS1002: TestConsoleApp1/Program.cs(13)"
Expand All @@ -256,7 +256,7 @@ public void Should_TestConsoleApp1_CodeAnalysis()
"TestConsoleApp1/Program.cs",
20,
20,
CheckWarningLevel.Warning,
AnnotationLevel.Warning,
"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.")
{
Title = "CA2213: TestConsoleApp1/Program.cs(20)"
Expand All @@ -282,7 +282,7 @@ public void Should_MSBLOC()
"MSBLOC.Core.Tests/Services/BinaryLogProcessorTests.cs",
56,
56,
CheckWarningLevel.Warning,
AnnotationLevel.Warning,
"The variable 'filename' is assigned but its value is never used")
{
Title = "CS0219: MSBLOC.Core.Tests/Services/BinaryLogProcessorTests.cs(56)"
Expand All @@ -293,7 +293,7 @@ public void Should_MSBLOC()
"MSBLOC.Core.Tests/Services/BinaryLogProcessorTests.cs",
83,
83,
CheckWarningLevel.Warning,
AnnotationLevel.Warning,
"The variable 'filename' is assigned but its value is never used")
{
Title = "CS0219: MSBLOC.Core.Tests/Services/BinaryLogProcessorTests.cs(83)"
Expand All @@ -318,7 +318,7 @@ public void Should_Parse_OctokitGraphQL()
"Octokit.GraphQL.Core/Connection.cs",
43,
43,
CheckWarningLevel.Warning,
AnnotationLevel.Warning,
"Missing XML comment for publicly visible type or member 'Connection.Uri'")
{
Title = "CS1591: Octokit.GraphQL.Core/Connection.cs(43)"
Expand All @@ -329,7 +329,7 @@ public void Should_Parse_OctokitGraphQL()
"Octokit.GraphQL.Core/Connection.cs",
44,
44,
CheckWarningLevel.Warning,
AnnotationLevel.Warning,
"Missing XML comment for publicly visible type or member 'Connection.CredentialStore'")
{
Title = "CS1591: Octokit.GraphQL.Core/Connection.cs(44)"
Expand Down
16 changes: 8 additions & 8 deletions src/BCC.MSBuildLog.Tests/Services/BuildLogProcessorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void Should_Create_CheckRun_With_Warning()
Faker.System.FilePath(),
Faker.Random.Int(),
Faker.Random.Int(),
CheckWarningLevel.Warning,
AnnotationLevel.Warning,
Faker.Lorem.Word())
};

Expand All @@ -130,7 +130,7 @@ public void Should_Create_CheckRun_With_Configuration()
Faker.System.FilePath(),
Faker.Random.Int(),
Faker.Random.Int(),
CheckWarningLevel.Warning,
AnnotationLevel.Warning,
Faker.Lorem.Word())
};

Expand Down Expand Up @@ -174,7 +174,7 @@ public void Should_Create_CheckRun_With_Failure()
Faker.System.FilePath(),
Faker.Random.Int(),
Faker.Random.Int(),
CheckWarningLevel.Failure, Faker.Lorem.Word())
AnnotationLevel.Failure, Faker.Lorem.Word())
};

var mockBinaryLogProcessor = CreateMockBinaryLogProcessor(annotations, Faker.Lorem.Paragraph(), 0, 1);
Expand All @@ -196,13 +196,13 @@ public void Should_Create_CheckRun_With_WarningAndFailure()
Faker.System.FilePath(),
Faker.Random.Int(),
Faker.Random.Int(),
CheckWarningLevel.Warning,
AnnotationLevel.Warning,
Faker.Lorem.Word()),
new Annotation(
Faker.System.FilePath(),
Faker.Random.Int(),
Faker.Random.Int(),
CheckWarningLevel.Failure,
AnnotationLevel.Failure,
Faker.Lorem.Word())
};

Expand All @@ -225,7 +225,7 @@ public void Should_Create_CheckRun_TestConsoleApp1_Warning()
"TestConsoleApp1/Program.cs",
13,
13,
CheckWarningLevel.Warning,
AnnotationLevel.Warning,
"The variable 'hello' is assigned but its value is never used")
{
Title = "CS0219: TestConsoleApp1/Program.cs(13)"
Expand Down Expand Up @@ -254,7 +254,7 @@ public void Should_Create_CheckRun_TestConsoleApp1_Error()
"TestConsoleApp1/Program.cs",
13,
13,
CheckWarningLevel.Failure,
AnnotationLevel.Failure,
"; expected")
{
Title = "CS1002: TestConsoleApp1/Program.cs(13)"
Expand Down Expand Up @@ -283,7 +283,7 @@ public void Should_Create_CheckRun_TestConsoleApp1_CodeAnalysis()
"TestConsoleApp1/Program.cs",
20,
20,
CheckWarningLevel.Warning,
AnnotationLevel.Warning,
"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.")
{
Title = "CA2213: TestConsoleApp1/Program.cs(20)"
Expand Down
12 changes: 6 additions & 6 deletions src/BCC.MSBuildLog/Services/BinaryLogProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public LogData ProcessLog(string binLogPath, string cloneRoot, string owner, str
if (buildWarning == null && buildError == null)
continue;

CheckWarningLevel checkWarningLevel;
AnnotationLevel checkWarningLevel;
string buildCode;
string projectFile;
string file;
Expand All @@ -66,7 +66,7 @@ public LogData ProcessLog(string binLogPath, string cloneRoot, string owner, str
warningCount++;
recordTypeString = "Warning";

checkWarningLevel = CheckWarningLevel.Warning;
checkWarningLevel = AnnotationLevel.Warning;
buildCode = buildWarning.Code;
projectFile = buildWarning.ProjectFile;
file = buildWarning.File;
Expand All @@ -80,7 +80,7 @@ public LogData ProcessLog(string binLogPath, string cloneRoot, string owner, str
errorCount++;
recordTypeString = "Error";

checkWarningLevel = CheckWarningLevel.Failure;
checkWarningLevel = AnnotationLevel.Failure;
buildCode = buildError.Code;
projectFile = buildError.ProjectFile;
file = buildError.File;
Expand Down Expand Up @@ -118,13 +118,13 @@ public LogData ProcessLog(string binLogPath, string cloneRoot, string owner, str
case ReportAs.AsIs:
break;
case ReportAs.Notice:
checkWarningLevel = CheckWarningLevel.Notice;
checkWarningLevel = AnnotationLevel.Notice;
break;
case ReportAs.Warning:
checkWarningLevel = CheckWarningLevel.Warning;
checkWarningLevel = AnnotationLevel.Warning;
break;
case ReportAs.Error:
checkWarningLevel = CheckWarningLevel.Failure;
checkWarningLevel = AnnotationLevel.Failure;
break;
default:
throw new ArgumentOutOfRangeException();
Expand Down

0 comments on commit e609860

Please sign in to comment.