CLASS
GekoPlugin
Contents
- Properties
magicNumberworkspaceMapperWithGlobsworkspaceMapper
- Methods
init(workspaceMapperWithGlobs:workspaceMapper:)toPointer()
swift
public class GekoPluginClass for descripting geko plugins
To create a plugin, write a function using following template.
swift
@_cdecl("loadGekoPlugin") func loadGekoPlugin() -> UnsafeMutableRawPointer {
return GekoPlugin(workspaceMapper: { _ in }).toPointer()
}It is important to keep name of cdecl, otherwise geko will not be able to load plugin.
It is important to convert plugin to a pointer using toPointer method, to keep instance of GekoPlugin retained.
Properties
magicNumber
swift
public let magicNumber = 3716326Magic number to identify Geko plugin during loading.
workspaceMapperWithGlobs
swift
public let workspaceMapperWithGlobs: ((inout WorkspaceWithProjects, Parameters, DependenciesGraph) throws -> ([SideEffectDescriptor], [LintingIssue]))?Closure which is called when workspace is finished loading. Workspace contains unresolved globs, such as **/*.swift.
workspaceMapper
swift
public let workspaceMapper: ((inout WorkspaceWithProjects, Parameters, DependenciesGraph) throws -> ([SideEffectDescriptor], [LintingIssue]))?Closure which is called when workspace is finished resolving globs.
Methods
init(workspaceMapperWithGlobs:workspaceMapper:)
swift
public init(
workspaceMapperWithGlobs: ((inout WorkspaceWithProjects, Parameters, DependenciesGraph) throws -> ([SideEffectDescriptor], [LintingIssue]))? = nil,
workspaceMapper: ((inout WorkspaceWithProjects, Parameters, DependenciesGraph) throws -> ([SideEffectDescriptor], [LintingIssue]))? = nil
)toPointer()
swift
public func toPointer() -> UnsafeMutableRawPointerHelper method for converting an object to a pointer.
