C# Class SonarQube.Plugins.Roslyn.AnalyzerPluginGenerator

Datei anzeigen Open project: SonarSource-VisualStudio/sonarqube-roslyn-sdk Class Usage Examples

Public Methods

Method Description
AnalyzerPluginGenerator ( INuGetPackageHandler packageHandler, SonarQube logger ) : System
CreatePluginManifest ( IPackage package ) : PluginManifest
Generate ( ProcessedArgs args ) : bool

Private Methods

Method Description
AddRoslynMetadata ( SonarQube.Plugins.Roslyn.RoslynPluginJarBuilder builder, SonarQube.Plugins.Roslyn.RoslynPluginDefinition definition, string repositoryId ) : void
BuildPlugin ( SonarQube.Plugins.Roslyn.RoslynPluginDefinition definition, string outputDirectory ) : string

Builds the plugin and returns the name of the jar that was created

CalculateSqaleFileName ( IPackage package, string directory ) : string
CreateAnalyzerStaticPayloadFile ( string packageRootDir, string outputDir ) : string
CreateBaseWorkingDirectory ( ) : string

Creates a uniquely-named temp directory for this generation run

GenerateFixedSqaleFile ( IEnumerable analyzers, string outputFilePath ) : void

Generates a SQALE file with fixed remediation costs for the specified analyzers

GeneratePluginForPackage ( string outputDir, string language, string sqaleFilePath, IPackage package, IEnumerable analyzers ) : string
GenerateRulesFile ( IEnumerable analyzers, string baseDirectory ) : string

Generate a rules file for the specified analyzers

GetAnalyzers ( IPackage package, string language ) : IEnumerable

Retrieves the analyzers contained within a given NuGet package corresponding to a given language

GetPackagesRequiringLicenseAcceptance ( IPackage package ) : IEnumerable

Returns all of the packages from the supplied package and its dependencies that require license acceptance

GetValidManifestString ( string value ) : string
IncludeFileInZip ( string filePath ) : bool
IsValidSqaleFile ( string sqaleFilePath ) : bool

Checks that the supplied sqale file has valid content

ListPackagesRequiringLicenseAcceptance ( IEnumerable licensedPackages ) : void
ListToString ( IEnumerable args ) : string
LogAcceptedPackageLicenses ( IEnumerable licenseAcceptancePackages ) : void
LogMessageForGeneratedSqale ( string generatedSqaleFile ) : void

Method Details

AnalyzerPluginGenerator() public method

public AnalyzerPluginGenerator ( INuGetPackageHandler packageHandler, SonarQube logger ) : System
packageHandler INuGetPackageHandler
logger SonarQube
return System

CreatePluginManifest() public static method

public static CreatePluginManifest ( IPackage package ) : PluginManifest
package IPackage
return PluginManifest

Generate() public method

public Generate ( ProcessedArgs args ) : bool
args SonarQube.Plugins.Roslyn.CommandLine.ProcessedArgs
return bool