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