forked from coop-cloud/abra
refactor: drop uneccessary structs
This commit is contained in:
parent
87851d26f7
commit
eb3509ab3f
|
@ -28,50 +28,50 @@ type LintRule struct {
|
|||
}
|
||||
|
||||
var LintRules = map[string][]LintRule{
|
||||
"warn": []LintRule{
|
||||
LintRule{
|
||||
"warn": {
|
||||
{
|
||||
Ref: "R001",
|
||||
Level: "warn",
|
||||
Description: "compose config has expected version",
|
||||
HowToResolve: "ensure 'version: \"3.8\"' in compose configs",
|
||||
Function: LintComposeVersion,
|
||||
},
|
||||
LintRule{
|
||||
{
|
||||
Ref: "R002",
|
||||
Level: "warn",
|
||||
Description: "healthcheck enabled for all services",
|
||||
HowToResolve: "wire up healthchecks",
|
||||
Function: LintHealthchecks,
|
||||
},
|
||||
LintRule{
|
||||
{
|
||||
Ref: "R003",
|
||||
Level: "warn",
|
||||
Description: "all images use a tag",
|
||||
HowToResolve: "use a tag for all images",
|
||||
Function: LintAllImagesTagged,
|
||||
},
|
||||
LintRule{
|
||||
{
|
||||
Ref: "R004",
|
||||
Level: "warn",
|
||||
Description: "no unstable tags",
|
||||
HowToResolve: "tag all images with stable tags",
|
||||
Function: LintNoUnstableTags,
|
||||
},
|
||||
LintRule{
|
||||
{
|
||||
Ref: "R005",
|
||||
Level: "warn",
|
||||
Description: "tags use semver-like format",
|
||||
HowToResolve: "use semver-like tags",
|
||||
Function: LintSemverLikeTags,
|
||||
},
|
||||
LintRule{
|
||||
{
|
||||
Ref: "R006",
|
||||
Level: "warn",
|
||||
Description: "has published catalogue version",
|
||||
HowToResolve: "publish a recipe version to the catalogue",
|
||||
Function: LintHasPublishedVersion,
|
||||
},
|
||||
LintRule{
|
||||
{
|
||||
Ref: "R007",
|
||||
Level: "warn",
|
||||
Description: "README.md metadata filled in",
|
||||
|
@ -79,43 +79,43 @@ var LintRules = map[string][]LintRule{
|
|||
Function: LintMetadataFilledIn,
|
||||
},
|
||||
},
|
||||
"error": []LintRule{
|
||||
LintRule{
|
||||
"error": {
|
||||
{
|
||||
Ref: "R008",
|
||||
Level: "error",
|
||||
Description: ".env.sample provided",
|
||||
HowToResolve: "create an example .env.sample",
|
||||
Function: LintEnvConfigPresent,
|
||||
},
|
||||
LintRule{
|
||||
{
|
||||
Ref: "R009",
|
||||
Level: "error",
|
||||
Description: "one service named 'app'",
|
||||
HowToResolve: "name a servce 'app'",
|
||||
Function: LintAppService,
|
||||
},
|
||||
LintRule{
|
||||
{
|
||||
Ref: "R010",
|
||||
Level: "error",
|
||||
Description: "traefik routing enabled",
|
||||
HowToResolve: "include \"traefik.enable=true\" deploy label",
|
||||
Function: LintTraefikEnabled,
|
||||
},
|
||||
LintRule{
|
||||
{
|
||||
Ref: "R011",
|
||||
Level: "error",
|
||||
Description: "all services have images",
|
||||
HowToResolve: "ensure \"image: ...\" set on all services",
|
||||
Function: LintImagePresent,
|
||||
},
|
||||
LintRule{
|
||||
{
|
||||
Ref: "R012",
|
||||
Level: "error",
|
||||
Description: "config version are vendored",
|
||||
HowToResolve: "vendor config versions in an abra.sh",
|
||||
Function: LintAbraShVendors,
|
||||
},
|
||||
LintRule{
|
||||
{
|
||||
Ref: "R013",
|
||||
Level: "error",
|
||||
Description: "git.coopcloud.tech repo exists",
|
||||
|
|
Loading…
Reference in New Issue