C# Class Microsoft.CodeAnalysis.Sarif.Converters.AndroidStudioConverter

Converts an xml log file of the Android Studio format into the SARIF format
Inheritance: ToolFileConverterBase
Show file Open project: Microsoft/sarif-sdk Class Usage Examples

Public Methods

Method Description
AndroidStudioConverter ( ) : System

Initializes a new instance of the AndroidStudioConverter class.

Convert ( Stream input, IResultLogWriter output ) : void

Converts an Android Studio formatted log as input into a SARIF SarifLog using the output.

ConvertProblemToSarifResult ( AndroidStudioProblem problem ) : System.Result
GetShortDescriptionForProblem ( AndroidStudioProblem problem ) : string

Generates a user-facing description for a problem, using the description supplied at construction time if it is present; otherwise, generates a description from the problem type.

Private Methods

Method Description
CreateLogicalLocation ( AndroidStudioProblem problem ) : string
CreateSignature ( AndroidStudioProblem problem ) : string
GenerateFullMessage ( string description, ImmutableArray hints ) : string
ProcessAndroidStudioLog ( XmlReader xmlReader ) : ISet

Processes an Android Studio log and writes issues therein to an instance of IResultLogWriter.

RemoveBadRoot ( string path, Uri &uri ) : bool
SetSarifResultPropertiesForProblem ( System.Result result, AndroidStudioProblem problem ) : void
TryAddLogicalLocation ( string parentKey, string value, string kind, string delimiter = @"\" ) : string

Method Details

AndroidStudioConverter() public method

Initializes a new instance of the AndroidStudioConverter class.
public AndroidStudioConverter ( ) : System
return System

Convert() public method

Converts an Android Studio formatted log as input into a SARIF SarifLog using the output.
public Convert ( Stream input, IResultLogWriter output ) : void
input Stream The Android Studio formatted log.
output IResultLogWriter The SarifLog to write the output to.
return void

ConvertProblemToSarifResult() public method

public ConvertProblemToSarifResult ( AndroidStudioProblem problem ) : System.Result
problem AndroidStudioProblem
return System.Result

GetShortDescriptionForProblem() public static method

Generates a user-facing description for a problem, using the description supplied at construction time if it is present; otherwise, generates a description from the problem type.
public static GetShortDescriptionForProblem ( AndroidStudioProblem problem ) : string
problem AndroidStudioProblem The problem.
return string