Documentation ¶
Index ¶
- func Detect(filepath string, language heartbeat.Language) ([]string, error)
- func WithDetection(c Config) heartbeat.HandleOption
- type Config
- type DependencyParser
- type ParserC
- type ParserCSharp
- type ParserElm
- type ParserGo
- type ParserHTML
- type ParserHaskell
- type ParserHaxe
- type ParserJSON
- type ParserJava
- type ParserJavaScript
- type ParserKotlin
- type ParserObjectiveC
- type ParserPHP
- type ParserPython
- type ParserRust
- type ParserScala
- type ParserSwift
- type ParserUnknown
- type ParserVbNet
- type StateC
- type StateCSharp
- type StateElm
- type StateGo
- type StateHTML
- type StateHaskell
- type StateHaxe
- type StateJSON
- type StateJava
- type StateJavaScript
- type StateKotlin
- type StateObjectiveC
- type StatePHP
- type StatePython
- type StateRust
- type StateScala
- type StateSwift
- type StateVbNet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithDetection ¶
func WithDetection(c Config) heartbeat.HandleOption
WithDetection initializes and returns a heartbeat handle option, which can be used in a heartbeat processing pipeline to detect dependencies inside the entity file of heartbeats of type FileType. Will prioritize local file if available.
Types ¶
type Config ¶
type Config struct { // FilePatterns will be matched against a file entities name and if matching, will skip // dependency scanning. FilePatterns []regex.Regex }
Config contains configurations for dependency scanning.
type DependencyParser ¶
DependencyParser is a dependency parser for a programming language.
type ParserC ¶
ParserC is a dependency parser for the c programming language. It is not thread safe.
type ParserCSharp ¶
type ParserCSharp struct { Buffer string Output []string State StateCSharp }
ParserCSharp is a dependency parser for the c# programming language. It is not thread safe.
type ParserElm ¶
ParserElm is a dependency parser for the elm programming language. It is not thread safe.
type ParserGo ¶
ParserGo is a dependency parser for the go programming language. It is not thread safe.
type ParserHTML ¶
type ParserHTML struct { CurrentAttribute string CurrentTag string State StateHTML Output []string }
ParserHTML is a dependency parser for the HTML markup language. It is not thread safe.
type ParserHaskell ¶
type ParserHaskell struct { State StateHaskell Output []string }
ParserHaskell is a dependency parser for the Haskell programming language. It is not thread safe.
type ParserHaxe ¶
ParserHaxe is a dependency parser for the Haxe programming language. It is not thread safe.
type ParserJSON ¶
ParserJSON is a dependency parser for JSON parser. It is not thread safe.
type ParserJava ¶
ParserJava is a dependency parser for the java programming language. It is not thread safe.
type ParserJavaScript ¶
type ParserJavaScript struct { State StateJavaScript Output []string }
ParserJavaScript is a dependency parser for the JavaScript programming language. It is not thread safe.
type ParserKotlin ¶
type ParserKotlin struct { State StateKotlin Output []string }
ParserKotlin is a dependency parser for the Kotlin programming language. It is not thread safe.
type ParserObjectiveC ¶
type ParserObjectiveC struct { State StateObjectiveC Output []string }
ParserObjectiveC is a dependency parser for the objective-c programming language. It is not thread safe.
type ParserPHP ¶
ParserPHP is a dependency parser for the php programming language. It is not thread safe.
type ParserPython ¶
type ParserPython struct { State StatePython Buffer string Output []string }
ParserPython is a dependency parser for the python programming language. It is not thread safe.
type ParserRust ¶
ParserRust is a dependency parser for the rust programming language. It is not thread safe.
type ParserScala ¶
type ParserScala struct { State StateScala Output []string }
ParserScala is a dependency parser for the Scala programming language. It is not thread safe.
type ParserSwift ¶
type ParserSwift struct { State StateSwift Output []string }
ParserSwift is a dependency parser for the swift programming language. It is not thread safe.
type ParserUnknown ¶
type ParserUnknown struct {
Output []string
}
ParserUnknown is a dependency parser for unknown parser. It is not thread safe.
type ParserVbNet ¶
type ParserVbNet struct { Buffer string Output []string State StateVbNet }
ParserVbNet is a dependency parser for the vb.net programming language. It is not thread safe.
type StateCSharp ¶
type StateCSharp int
StateCSharp is a token parsing state.
const ( // StateCSharpUnknown represents a unknown token parsing state. StateCSharpUnknown StateCSharp = iota // StateCSharpImport means we are in import section during token parsing. StateCSharpImport )
type StateHaskell ¶
type StateHaskell int
StateHaskell is a token parsing state.
const ( // StateHaskellUnknown represents an unknown token parsing state. StateHaskellUnknown StateHaskell = iota // StateHaskellImport means we are in import section during token parsing. StateHaskellImport )
type StateJavaScript ¶
type StateJavaScript int
StateJavaScript is a token parsing state.
const ( // StateJavaScriptUnknown represents an unknown token parsing state. StateJavaScriptUnknown StateJavaScript = iota // StateJavaScriptImport means we are in import section during token parsing. StateJavaScriptImport )
type StateKotlin ¶
type StateKotlin int
StateKotlin is a token parsing state.
const ( // StateKotlinUnknown represents an unknown token parsing state. StateKotlinUnknown StateKotlin = iota // StateKotlinImport means we are in import section during token parsing. StateKotlinImport )
type StateObjectiveC ¶
type StateObjectiveC int
StateObjectiveC is a token parsing state.
const ( // StateObjectiveCUnknown represents a unknown token parsing state. StateObjectiveCUnknown StateObjectiveC = iota // StateObjectiveCHash means we are in hash section during token parsing. StateObjectiveCHash )
type StatePHP ¶
type StatePHP int
StatePHP is a token parsing state.
const ( // StatePHPUnknown represents a unknown php token parsing state. StatePHPUnknown StatePHP = iota // StatePHPUse represents php token parsing state use. StatePHPUse // StatePHPUseFunction represents php token parsing state use function. StatePHPUseFunction // StatePHPInclude represents php token parsing state include. StatePHPInclude // StatePHPAs represents php token parsing state as. StatePHPAs )
type StatePython ¶
type StatePython int
StatePython is a token parsing state.
const ( // StatePythonUnknown represents an unknown token parsing state. StatePythonUnknown StatePython = iota // StatePythonFrom means we are in from section of import during token parsing. StatePythonFrom // StatePythonImport means we are in import section during token parsing. StatePythonImport )
type StateScala ¶
type StateScala int
StateScala is a token parsing state.
const ( // StateScalaUnknown represents an unknown token parsing state. StateScalaUnknown StateScala = iota // StateScalaImport means we are in import section during token parsing. StateScalaImport )
type StateSwift ¶
type StateSwift int
StateSwift is a token parsing state.
const ( // StateSwiftUnknown represents unknown token parsing state. StateSwiftUnknown StateSwift = iota // StateSwiftImport means we are in hash section during token parsing. StateSwiftImport )
type StateVbNet ¶
type StateVbNet int
StateVbNet is a token parsing state.
const ( // StateVbNetUnknown represents a unknown token parsing state. StateVbNetUnknown StateVbNet = iota // StateVbNetImport means we are in import section during token parsing. StateVbNetImport )