298 lines
9.5 KiB
JSON
298 lines
9.5 KiB
JSON
{
|
|
"$schema": "http://json.schemastore.org/sarif-1.0.0",
|
|
"version": "1.0.0",
|
|
"runs": [
|
|
{
|
|
"tool": {
|
|
"name": "Microsoft (R) Visual C# Compiler",
|
|
"version": "5.3.0.0",
|
|
"fileVersion": "5.3.0-2.26153.122 (4d3023de605a78ba3e59e50c657eed70f125c68a)",
|
|
"semanticVersion": "5.3.0",
|
|
"language": "en-RS"
|
|
},
|
|
"results": [
|
|
{
|
|
"ruleId": "CS8602",
|
|
"level": "warning",
|
|
"message": "Dereference of a possibly null reference.",
|
|
"suppressionStates": [
|
|
"suppressedInSource"
|
|
],
|
|
"locations": [
|
|
{
|
|
"resultFile": {
|
|
"uri": "file:///Users/bobanlapcevic/Desktop/theInterfacePro/UnitTests/ProjectClassTests.cs",
|
|
"region": {
|
|
"startLine": 19,
|
|
"startColumn": 21,
|
|
"endLine": 19,
|
|
"endColumn": 38
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"properties": {
|
|
"warningLevel": 1
|
|
}
|
|
},
|
|
{
|
|
"ruleId": "CS8602",
|
|
"level": "warning",
|
|
"message": "Dereference of a possibly null reference.",
|
|
"suppressionStates": [
|
|
"suppressedInSource"
|
|
],
|
|
"locations": [
|
|
{
|
|
"resultFile": {
|
|
"uri": "file:///Users/bobanlapcevic/Desktop/theInterfacePro/UnitTests/ProjectClassTests.cs",
|
|
"region": {
|
|
"startLine": 42,
|
|
"startColumn": 21,
|
|
"endLine": 42,
|
|
"endColumn": 38
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"properties": {
|
|
"warningLevel": 1
|
|
}
|
|
},
|
|
{
|
|
"ruleId": "CS8602",
|
|
"level": "warning",
|
|
"message": "Dereference of a possibly null reference.",
|
|
"suppressionStates": [
|
|
"suppressedInSource"
|
|
],
|
|
"locations": [
|
|
{
|
|
"resultFile": {
|
|
"uri": "file:///Users/bobanlapcevic/Desktop/theInterfacePro/UnitTests/ProjectClassTests.cs",
|
|
"region": {
|
|
"startLine": 69,
|
|
"startColumn": 21,
|
|
"endLine": 69,
|
|
"endColumn": 38
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"properties": {
|
|
"warningLevel": 1
|
|
}
|
|
},
|
|
{
|
|
"ruleId": "NUnit1028",
|
|
"level": "note",
|
|
"message": "Only test methods should be public",
|
|
"locations": [
|
|
{
|
|
"resultFile": {
|
|
"uri": "file:///Users/bobanlapcevic/Desktop/theInterfacePro/UnitTests/ProjectClassTests.cs",
|
|
"region": {
|
|
"startLine": 104,
|
|
"startColumn": 33,
|
|
"endLine": 104,
|
|
"endColumn": 63
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"properties": {
|
|
"warningLevel": 1
|
|
}
|
|
},
|
|
{
|
|
"ruleId": "S2699",
|
|
"level": "warning",
|
|
"message": "Add at least one assertion to this test case.",
|
|
"locations": [
|
|
{
|
|
"resultFile": {
|
|
"uri": "file:///Users/bobanlapcevic/Desktop/theInterfacePro/UnitTests/ProjectClassTests.cs",
|
|
"region": {
|
|
"startLine": 73,
|
|
"startColumn": 17,
|
|
"endLine": 73,
|
|
"endColumn": 56
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"properties": {
|
|
"warningLevel": 1
|
|
}
|
|
},
|
|
{
|
|
"ruleId": "CA1822",
|
|
"level": "note",
|
|
"message": "Member 'SetProjectAndStoryHelperMethod' does not access instance data and can be marked as static",
|
|
"locations": [
|
|
{
|
|
"resultFile": {
|
|
"uri": "file:///Users/bobanlapcevic/Desktop/theInterfacePro/UnitTests/ProjectClassTests.cs",
|
|
"region": {
|
|
"startLine": 104,
|
|
"startColumn": 33,
|
|
"endLine": 104,
|
|
"endColumn": 63
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"properties": {
|
|
"warningLevel": 1
|
|
}
|
|
},
|
|
{
|
|
"ruleId": "NUnit2045",
|
|
"level": "note",
|
|
"message": "Call independent Assert statements from inside an Assert.Multiple",
|
|
"locations": [
|
|
{
|
|
"resultFile": {
|
|
"uri": "file:///Users/bobanlapcevic/Desktop/theInterfacePro/UnitTests/ProjectClassTests.cs",
|
|
"region": {
|
|
"startLine": 87,
|
|
"startColumn": 9,
|
|
"endLine": 87,
|
|
"endColumn": 68
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"properties": {
|
|
"warningLevel": 1,
|
|
"customProperties": {
|
|
"SupportsEnterMultipleScope": "EnterMultipleScope"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"ruleId": "NUnit2046",
|
|
"level": "note",
|
|
"message": "Use Assert.That(<collection>, Has.Count.EqualTo(<value>)",
|
|
"locations": [
|
|
{
|
|
"resultFile": {
|
|
"uri": "file:///Users/bobanlapcevic/Desktop/theInterfacePro/UnitTests/ProjectClassTests.cs",
|
|
"region": {
|
|
"startLine": 60,
|
|
"startColumn": 21,
|
|
"endLine": 60,
|
|
"endColumn": 42
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"properties": {
|
|
"warningLevel": 1
|
|
}
|
|
},
|
|
{
|
|
"ruleId": "NUnit2046",
|
|
"level": "note",
|
|
"message": "Use Assert.That(<collection>, Has.Count.EqualTo(<value>)",
|
|
"locations": [
|
|
{
|
|
"resultFile": {
|
|
"uri": "file:///Users/bobanlapcevic/Desktop/theInterfacePro/UnitTests/ProjectClassTests.cs",
|
|
"region": {
|
|
"startLine": 86,
|
|
"startColumn": 21,
|
|
"endLine": 86,
|
|
"endColumn": 42
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"properties": {
|
|
"warningLevel": 1
|
|
}
|
|
}
|
|
],
|
|
"rules": {
|
|
"CA1822": {
|
|
"id": "CA1822",
|
|
"shortDescription": "Mark members as static",
|
|
"fullDescription": "Members that do not access instance data or call instance methods can be marked as static. After you mark the methods as static, the compiler will emit nonvirtual call sites to these members. This can give you a measurable performance gain for performance-sensitive code.",
|
|
"defaultLevel": "note",
|
|
"helpUri": "https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1822",
|
|
"properties": {
|
|
"category": "Performance",
|
|
"isEnabledByDefault": true,
|
|
"tags": [
|
|
"PortedFromFxCop",
|
|
"Telemetry",
|
|
"EnabledRuleInAggressiveMode"
|
|
]
|
|
}
|
|
},
|
|
"CS8602": {
|
|
"id": "CS8602",
|
|
"shortDescription": "Dereference of a possibly null reference.",
|
|
"defaultLevel": "warning",
|
|
"helpUri": "https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS8602)",
|
|
"properties": {
|
|
"category": "Compiler",
|
|
"isEnabledByDefault": true,
|
|
"tags": [
|
|
"Compiler",
|
|
"Telemetry"
|
|
]
|
|
}
|
|
},
|
|
"NUnit1028": {
|
|
"id": "NUnit1028",
|
|
"shortDescription": "The non-test method is public",
|
|
"fullDescription": "A fixture should not contain any public non-test methods.",
|
|
"defaultLevel": "note",
|
|
"helpUri": "https://github.com/nunit/nunit.analyzers/tree/master/documentation/NUnit1028.md",
|
|
"properties": {
|
|
"category": "Structure",
|
|
"isEnabledByDefault": true
|
|
}
|
|
},
|
|
"NUnit2045": {
|
|
"id": "NUnit2045",
|
|
"shortDescription": "Use Assert.Multiple",
|
|
"fullDescription": "Hosting Asserts inside an Assert.Multiple allows detecting more than one failure.",
|
|
"defaultLevel": "note",
|
|
"helpUri": "https://github.com/nunit/nunit.analyzers/tree/master/documentation/NUnit2045.md",
|
|
"properties": {
|
|
"category": "Assertion",
|
|
"isEnabledByDefault": true
|
|
}
|
|
},
|
|
"NUnit2046": {
|
|
"id": "NUnit2046",
|
|
"shortDescription": "Use CollectionConstraint for better assertion messages in case of failure",
|
|
"fullDescription": "Use Has.Length/Has.Count/Is.Empty instead of testing property directly.",
|
|
"defaultLevel": "note",
|
|
"helpUri": "https://github.com/nunit/nunit.analyzers/tree/master/documentation/NUnit2046.md",
|
|
"properties": {
|
|
"category": "Assertion",
|
|
"isEnabledByDefault": true
|
|
}
|
|
},
|
|
"S2699": {
|
|
"id": "S2699",
|
|
"shortDescription": "Tests should include assertions",
|
|
"fullDescription": "The rule targets test methods that lack an assertion and consist solely of an action and, optionally, a setup.",
|
|
"defaultLevel": "warning",
|
|
"properties": {
|
|
"category": "Blocker Code Smell",
|
|
"isEnabledByDefault": true,
|
|
"tags": [
|
|
"C#",
|
|
"TestSourceScope",
|
|
"SonarWay"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
} |