clang 20.0.0git
Public Member Functions | Static Public Member Functions | Friends | List of all members
clang::SarifRule Class Reference

A SARIF rule (reportingDescriptor object) contains information that describes a reporting item generated by a tool. More...

#include "clang/Basic/Sarif.h"

Public Member Functions

SarifRule setName (llvm::StringRef RuleName)
 
SarifRule setRuleId (llvm::StringRef RuleId)
 
SarifRule setDescription (llvm::StringRef RuleDesc)
 
SarifRule setHelpURI (llvm::StringRef RuleHelpURI)
 
SarifRule setDefaultConfiguration (const SarifReportingConfiguration &Configuration)
 

Static Public Member Functions

static SarifRule create ()
 

Friends

class clang::SarifDocumentWriter
 

Detailed Description

A SARIF rule (reportingDescriptor object) contains information that describes a reporting item generated by a tool.

A reporting item is either a result of analysis or notification of a condition encountered by the tool. Rules are arbitrary but are identifiable by a hierarchical rule-id.

This builder provides an interface to create SARIF reportingDescriptor objects via the SarifRule::create static method.

Reference:

  1. reportingDescriptor object

Definition at line 257 of file Sarif.h.

Member Function Documentation

◆ create()

static SarifRule clang::SarifRule::create ( )
inlinestatic

Definition at line 269 of file Sarif.h.

Referenced by createRuleMapping(), and clang::SARIFDiagnostic::emitDiagnosticMessage().

◆ setDefaultConfiguration()

SarifRule clang::SarifRule::setDefaultConfiguration ( const SarifReportingConfiguration Configuration)
inline

Definition at line 292 of file Sarif.h.

◆ setDescription()

SarifRule clang::SarifRule::setDescription ( llvm::StringRef  RuleDesc)
inline

Definition at line 281 of file Sarif.h.

Referenced by createRuleMapping().

◆ setHelpURI()

SarifRule clang::SarifRule::setHelpURI ( llvm::StringRef  RuleHelpURI)
inline

Definition at line 286 of file Sarif.h.

Referenced by createRuleMapping().

◆ setName()

SarifRule clang::SarifRule::setName ( llvm::StringRef  RuleName)
inline

Definition at line 271 of file Sarif.h.

Referenced by createRuleMapping().

◆ setRuleId()

SarifRule clang::SarifRule::setRuleId ( llvm::StringRef  RuleId)
inline

Definition at line 276 of file Sarif.h.

References Id.

Referenced by createRuleMapping(), and clang::SARIFDiagnostic::emitDiagnosticMessage().

Friends And Related Function Documentation

◆ clang::SarifDocumentWriter

friend class clang::SarifDocumentWriter
friend

Definition at line 258 of file Sarif.h.


The documentation for this class was generated from the following file: