Add command to run all checks at once

This commit is contained in:
kolaente 2020-09-01 22:17:30 +02:00
parent 0ccaaf943d
commit 07f01dfcdc
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 14 additions and 1 deletions

View File

@ -292,7 +292,7 @@ func DoTheSwag() {
func GotSwag() {
// The check is pretty cheaply done: We take the hash of the swagger.json file, generate the docs,
// hash the file again and compare the two hashes to see if anything changed. If that's the case,
// regenerating the docs is nessecary.
// regenerating the docs is necessary.
// swag is not capable of just outputting the generated docs to stdout, therefore we need to do it this way.
// Another drawback of this is obviously it will only work once - we're not resetting the newly generated
// docs after the check. This behaviour is good enough for ci though.
@ -357,6 +357,19 @@ func GoconstCheck() {
runAndStreamOutput("goconst", ApiPackages...)
}
// Runs fmt-check, lint, got-swag, misspell-check, ineffasign-check, gocyclo-check, static-check, gosec-check, goconst-check all in parallel
func Checks() {
mg.Deps(
FmtCheck,
Lint,
GotSwag,
MisspellCheck,
IneffassignCheck,
GocycloCheck,
StaticCheck,
GoSecCheck,
GoconstCheck,
)
}
// Generates static content into the final binary