Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRootDir ¶
Types ¶
type Config ¶
type Config struct { ErrorLevel errlevel.Level `json:"error_level,omitempty"` ShownErrorLevel errlevel.Level `json:"shown_error_level,omitempty"` Targets []*Target `json:"targets,omitempty"` Outputs Outputs `json:"outputs,omitempty"` ModuleArchives map[string]*ModuleArchive `json:"module_archives,omitempty"` IgnoredPatterns []string `json:"ignore_patterns,omitempty"` }
type DataFile ¶ added in v0.3.0
func NewDataFile ¶ added in v0.3.0
type LintGlob ¶
type LintGlob struct { // Glob is either an absolute path or a relative path from configuration file path Glob string `json:"path"` Config map[string]any `json:"config,omitempty"` Excluded bool `json:"-"` }
func (*LintGlob) UnmarshalJSON ¶
type LintGlobFile ¶ added in v0.3.0
type LintGlobFile struct { Path string `json:"path"` Config map[string]any `json:"config,omitempty"` Excluded bool `json:"excluded,omitempty"` }
func (*LintGlobFile) Clean ¶ added in v0.3.0
func (lg *LintGlobFile) Clean()
func (*LintGlobFile) UnmarshalJSON ¶ added in v0.3.0
func (lg *LintGlobFile) UnmarshalJSON(b []byte) error
type Module ¶
type Module struct { Archive *ModuleArchive SlashPath string Config map[string]interface{} }
func ParseImport ¶
type ModuleArchive ¶
type ModuleArchive struct { Type string `json:"type,omitempty"` Host string `json:"host,omitempty"` RepoOwner string `json:"repo_owner,omitempty"` RepoName string `json:"repo_name,omitempty"` Ref string `json:"ref,omitempty"` Tag string `json:"tag,omitempty"` }
func (*ModuleArchive) FilePath ¶
func (m *ModuleArchive) FilePath() string
func (*ModuleArchive) String ¶ added in v0.3.0
func (m *ModuleArchive) String() string
String returns a human readable string. This is different from file path. This is used for log.
type ModuleGlob ¶
type ModuleGlob struct { SlashPath string `json:"slash_path,omitempty"` Archive *ModuleArchive `json:"archive,omitempty"` Config map[string]interface{} `json:"config,omitempty"` Files []*LintGlobFile `json:"files,omitempty"` Excluded bool `json:"excluded,omitempty"` }
func ParseModuleLine ¶
func ParseModuleLine(line string) (*ModuleGlob, error)
type Output ¶
type Output struct { ID string `json:"id"` // text/template, html/template, jsonnet Renderer string `json:"renderer"` // path to a template file Template string `json:"template"` // parameter Config map[string]any `json:"config"` // Transform is a transformation file path. // A transformation file transforms lint results before the results are outputted. // A tranformation file must be a Jsonnet. // A file path must be an absolute path, a relative path from the configuration file, or a module path. // e.g. // transform.jsonnnet // /home/foo/.lintent/transform.jsonnnet // github_archive/github.com/lintnet/modules/transform.jsonnet@32ca3be646ec5b5861aab72fed30cd71f6eba9bf:v0.1.2 Transform string `json:"transform"` TemplateModule *Module `json:"-"` TransformModule *Module `json:"-"` }
func (*Output) Preprocess ¶ added in v0.3.0
func (o *Output) Preprocess(modules map[string]*ModuleArchive) error
type Outputs ¶ added in v0.3.0
type Outputs []*Output
func (Outputs) Preprocess ¶ added in v0.3.0
func (os Outputs) Preprocess(modules map[string]*ModuleArchive) error
type RawConfig ¶
type RawConfig struct { FilePath string `json:"-"` ErrorLevel string `json:"error_level,omitempty"` ShownErrorLevel string `json:"shown_error_level,omitempty"` IgnoredDirs []string `json:"ignored_dirs,omitempty"` Targets []*RawTarget `json:"targets"` Outputs Outputs `json:"outputs,omitempty"` }
type RawModule ¶
type RawModule struct { Glob string `json:"path"` Files []*LintGlobFile `json:"files,omitempty"` Config map[string]any `json:"config"` }
func (*RawModule) Parse ¶
func (rm *RawModule) Parse() (*ModuleGlob, error)
func (*RawModule) UnmarshalJSON ¶
type RawTarget ¶
type Target ¶
type Target struct { ID string `json:"id,omitempty"` BaseDataPath string `json:"base_data_path,omitempty"` LintFiles []*LintGlob `json:"lint_files,omitempty"` Modules []*ModuleGlob `json:"modules,omitempty"` ModuleArchives map[string]*ModuleArchive `json:"module_archives,omitempty"` DataFiles []*DataFile `json:"data_files,omitempty"` }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.