Add command to run all checks at once
This commit is contained in:
parent
0ccaaf943d
commit
07f01dfcdc
15
magefile.go
15
magefile.go
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue