config

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigFilePath

func ConfigFilePath(base string) string

ConfigFilePath returns the path to qlt.conf.json under the base directory.

Types

type CodeQLPackConfiguration

type CodeQLPackConfiguration struct {
	Name             string `json:"name"`
	Bundle           bool   `json:"bundle,omitempty"`
	Publish          bool   `json:"publish,omitempty"`
	ReferencesBundle bool   `json:"referencesBundle,omitempty"`
}

CodeQLPackConfiguration represents a single CodeQL pack entry in qlt.conf.json.

type QLTConfig

type QLTConfig struct {
	CodeQLCLIVersion        string                    `json:"version,omitempty"`
	CodeQLPackConfiguration []CodeQLPackConfiguration `json:"packs,omitempty"`
	// contains filtered or unexported fields
}

QLTConfig holds the QLT configuration loaded from qlt.conf.json.

func LoadFromFile

func LoadFromFile(base string) (*QLTConfig, error)

LoadFromFile reads qlt.conf.json from the given base directory. Returns nil if the file does not exist.

func MustLoadFromFile

func MustLoadFromFile(base string) *QLTConfig

MustLoadFromFile loads the config or exits with an error.

func (*QLTConfig) SaveToFile

func (c *QLTConfig) SaveToFile(base string) error

SaveToFile writes the config to qlt.conf.json in the base directory, creating the directory if it does not exist.

func (*QLTConfig) UpsertPackConfig

func (c *QLTConfig) UpsertPackConfig(name string, bundle bool)

UpsertPackConfig adds or updates the CodeQLPackConfiguration entry for the given name.

type QueryEntry

type QueryEntry struct {
	Name     string `json:"name"`
	Language string `json:"language"`
	Pack     string `json:"pack"`
	Scope    string `json:"scope,omitempty"`
}

QueryEntry records a generated query so it can be resolved by name later.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL