Add ineffasign-check

This commit is contained in:
kolaente 2020-09-01 21:57:16 +02:00
parent ef9dc81da6
commit 56b704335e
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 9 additions and 6 deletions

View File

@ -53,11 +53,12 @@ var (
// Aliases are mage aliases of targets
Aliases = map[string]interface{}{
"integration-test": IntegrationTest,
"fmt-check": FmtCheck,
"do-the-swag": DoTheSwag,
"got-swag": GotSwag,
"misspell-check": MisspellCheck,
"integration-test": IntegrationTest,
"fmt-check": FmtCheck,
"do-the-swag": DoTheSwag,
"got-swag": GotSwag,
"misspell-check": MisspellCheck,
"ineffassign-check": IneffassignCheck,
}
)
@ -318,8 +319,10 @@ func MisspellCheck() {
runAndStreamOutput("misspell", append([]string{"-error"}, GoFiles...)...)
}
// Checks the source code for ineffectual assigns
func IneffassignCheck() {
checkAndInstallGoTool("ineffassign", "github.com/gordonklaus/ineffassign")
runAndStreamOutput("ineffassign", GoFiles...)
}
func GocycloCheck() {