Documentation
¶
Overview ¶
Package packcheck validates the structure of an ichava icon pack checkout: its composer.json, its manifest, that a pack config names it, its sets, licences and categories, and that every file under the sets is an SVG that parses. The `validate` command and the web UI's Validate page share it.
Index ¶
Constants ¶
const ( ManifestPath = "resources/assets/svg/config.json" FilesDir = "resources/assets/svg/files" LicencesDir = "resources/assets/svg/licenses" )
Where a pack keeps things, relative to its root.
const ComposerType = "ichava-icon-set"
ComposerType is how a pack is recognised, and the only way (ichava's own rule): no folder or package name is matched.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Finding ¶
type Finding struct {
Level Level `json:"level"`
Check string `json:"check"`
Path string `json:"path,omitempty"`
Text string `json:"text"`
}
Finding is one problem. Path is relative to the pack root, for an annotation's file= and for a person; it may be empty.
type Options ¶
type Options struct {
// PackConfigs maps a composer name to the pack config that names it, so
// a pack no config syncs is reported.
PackConfigs map[string]string
// ParseSVGs parses every SVG. Slow on the large packs (bundled has over
// 120,000), so the web page makes it a choice.
ParseSVGs bool
// MaxListed caps the files a finding of one kind names one by one; the
// rest are counted. Zero means 50.
MaxListed int
}
Options tunes a check.
type Report ¶
type Report struct {
Root string `json:"root"`
Name string `json:"name,omitempty"`
Config string `json:"pack_config,omitempty"`
Sets int `json:"sets"`
SVGs int `json:"svgs"`
Findings []Finding `json:"findings"`
}
Report is one pack's result.