Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultConfig ¶
func DefaultConfig() string
Types ¶
type CommitMessageRule ¶
type Config ¶
type Config struct {
Tools map[string]Tool `yaml:"tools" json:"tools"`
Hooks map[string][]Hook `yaml:"hooks" json:"hooks"`
Policies *Policies `yaml:"policies" json:"policies"`
ExcludeTags []string `yaml:"exclude_tags" json:"exclude_tags"`
Parallel bool `yaml:"parallel" json:"parallel"`
ScriptsDir string `yaml:"scripts_dir" json:"scripts_dir"`
}
func (*Config) GetPolicyURLs ¶
func (*Config) HasRemotePolicies ¶
type ForbiddenContentPattern ¶
type Hook ¶
type Hook struct {
Name string `yaml:"name" json:"name"`
Tool string `yaml:"tool" json:"tool"`
Run string `yaml:"run" json:"run"`
Script string `yaml:"script" json:"script"`
Runner string `yaml:"runner" json:"runner"`
Args []string `yaml:"args" json:"args"`
FixArgs []string `yaml:"fix_args" json:"fix_args"`
Files string `yaml:"files" json:"files"`
Glob string `yaml:"glob" json:"glob"`
Exclude string `yaml:"exclude" json:"exclude"`
Root string `yaml:"root" json:"root"`
Timeout string `yaml:"timeout" json:"timeout"`
After string `yaml:"after" json:"after"`
Skip string `yaml:"skip" json:"skip"`
Only string `yaml:"only" json:"only"`
Tags []string `yaml:"tags" json:"tags"`
Env map[string]string `yaml:"env" json:"env"`
PassEnv []string `yaml:"pass_env" json:"pass_env"`
FailFast bool `yaml:"fail_fast" json:"fail_fast"`
Interactive bool `yaml:"interactive" json:"interactive"`
StageFixed bool `yaml:"stage_fixed" json:"stage_fixed"`
Piped bool `yaml:"piped" json:"piped"`
}
type LocalPolicy ¶
type Policies ¶
type Policies struct {
Type string `yaml:"type" json:"type"`
Policies []PolicyRef `yaml:"policies" json:"policies"`
LocalPolicies []LocalPolicy `yaml:"localPolicies" json:"localPolicies"`
LuaScripts []string `yaml:"lua_scripts" json:"lua_scripts"`
}
type PolicyRules ¶
type PolicyRules struct {
ForbidFiles []string `yaml:"forbid_files" json:"forbid_files"`
ForbidDirectories []string `yaml:"forbid_directories" json:"forbid_directories"`
ForbidFileExtensions []string `yaml:"forbid_file_extensions" json:"forbid_file_extensions"`
RequiredFiles []string `yaml:"required_files" json:"required_files"`
MaxFileSizeKB int `yaml:"max_file_size_kb" json:"max_file_size_kb"`
MaxFilesChanged int `yaml:"max_files_changed" json:"max_files_changed"`
ForbidFileContent []ForbiddenContentPattern `yaml:"forbid_file_content" json:"forbid_file_content"`
ExcludeExtensions []string `yaml:"exclude_extensions" json:"exclude_extensions"`
CommitMessage *CommitMessageRule `yaml:"commit_message" json:"commit_message"`
EnforceHooks []string `yaml:"enforce_hooks" json:"enforce_hooks"`
HookTimeBudgetMs map[string]int `yaml:"hook_time_budget_ms" json:"hook_time_budget_ms"`
MaxParallelHooks int `yaml:"max_parallel_hooks" json:"max_parallel_hooks"`
}
Click to show internal directories.
Click to hide internal directories.