Last active
December 15, 2021 14:44
-
-
Save displague/94aa6e20a2aba10adc6582222acd6ee5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ find . -name go.mod | sed s/go.mod// | xargs -I{} sh -c 'cd {}; GOOS=linux golangci-lint run --path-prefix {} --fix ./...' | |
pkg/img/build.go:32:2: `defaultDockerRegistry` is unused (deadcode) | |
defaultDockerRegistry = "https://index.docker.io/v1/" | |
^ | |
cmd/hub/cmd/generate.go:51:11: Error return value of `os.Mkdir` is not checked (errcheck) | |
os.Mkdir(generateOpts.output, 0700) | |
^ | |
cmd/hub/main.go:10:19: Error return value of `logger.Sync` is not checked (errcheck) | |
defer logger.Sync() // flushes buffer, if any | |
^ | |
pkg/git/action.go:52:7: S1002: should omit comparison to bool constant, can be simplified to `!detected[action.String()]` (gosimple) | |
if detected[action.String()] == false { | |
^ | |
cmd/hub/cmd/generate.go:41:5: S1002: should omit comparison to bool constant, can be simplified to `!info.IsDir()` (gosimple) | |
if info.IsDir() == false { | |
^ | |
actions/cexec/v1/main.go:15:5: `Release` is unused (deadcode) | |
var Release struct { | |
^ | |
actions/cexec/v1/main.go:68:4: printf: github.com/sirupsen/logrus.Fatalln call has possible formatting directive %s (govet) | |
log.Fatalln("Error parsing [\"DEFAULT_INTERPETER\"] [%s]", defaultInterpreter) | |
^ | |
actions/oci2disk/v1/pkg/image/image.go:29:5: `tick` is unused (deadcode) | |
var tick chan time.Time | |
^ | |
actions/oci2disk/v1/pkg/image/image.go:43:6: `tickerProgress` is unused (deadcode) | |
func tickerProgress(byteCounter uint64) { | |
^ | |
actions/oci2disk/v1/pkg/image/writer.go:136:22: S1019: should use make([]byte, wOpts.Blocksize) instead (gosimple) | |
b := make([]byte, wOpts.Blocksize, wOpts.Blocksize) | |
^ | |
actions/oci2disk/v1/pkg/image/writer.go:150:23: S1019: should use make([]byte, wOpts.Blocksize) instead (gosimple) | |
b := make([]byte, wOpts.Blocksize, wOpts.Blocksize) | |
^ | |
actions/grub2disk/v1/main.go:13:2: printf: `fmt.Println` arg list ends with redundant newline (govet) | |
fmt.Println("GRUB2Disk - GRUB streamer\n------------------------\n") | |
^ | |
actions/syslinux/v1/main.go:37:22: Error return value is not checked (errcheck) | |
ReReadPartitionTable(blockOut) | |
^ | |
actions/syslinux/v1/main.go:40:9: ineffectual assignment to err (ineffassign) | |
mbrIn, err := os.OpenFile("/mbr.bin.386", os.O_RDONLY, 0644) | |
^ | |
actions/syslinux/v1/main.go:41:2: SA5001: should check returned error before deferring mbrIn.Close() (staticcheck) | |
defer mbrIn.Close() | |
^ | |
actions/slurp/v1/server/main.go:72:6: `configHandler` is unused (deadcode) | |
func configHandler(w http.ResponseWriter, r *http.Request) { | |
^ | |
actions/slurp/v1/pkg/image/image.go:19:5: `tick` is unused (deadcode) | |
var tick chan time.Time | |
^ | |
actions/slurp/v1/pkg/image/image.go:33:6: `tickerProgress` is unused (deadcode) | |
func tickerProgress(byteCounter uint64) { | |
^ | |
actions/slurp/v1/server/main.go:47:22: Error return value of `r.ParseMultipartForm` is not checked (errcheck) | |
r.ParseMultipartForm(32 << 20) | |
^ | |
actions/slurp/v1/server/main.go:73:9: Error return value of `w.Write` is not checked (errcheck) | |
w.Write(data) | |
^ | |
actions/slurp/v1/server/main.go:22:5: var `data` is unused (unused) | |
var data []byte | |
^ | |
actions/slurp/v1/pkg/image/image.go:126:4: ineffectual assignment to err (ineffassign) | |
err = zipWriter.Close() | |
^ | |
actions/qemuimg2disk/v1/partprobe.go:12:2: SA5001: should check returned error before deferring fileOut.Close() (staticcheck) | |
defer fileOut.Close() | |
^ | |
actions/rootio/v1/cmd/rootio.go:152:16: Error return value of `json.Unmarshal` is not checked (errcheck) | |
json.Unmarshal(byteValue, &mdata) | |
^ | |
actions/kexec/v1/cmd/grub/grub.go:114:2: `grubV1` is unused (deadcode) | |
grubV1 grubVersion = 1 | |
^ | |
actions/kexec/v1/cmd/grub/grub.go:118:6: `unquote` is unused (deadcode) | |
func unquote(ver grubVersion, text string) string { | |
^ | |
actions/kexec/v1/cmd/kexec.go:98:14: Error return value of `unix.Reboot` is not checked (errcheck) | |
unix.Reboot(unix.LINUX_REBOOT_CMD_KEXEC) | |
^ | |
actions/kexec/v1/cmd/grub/grub.go:115:2: var `grubV2` is unused (unused) | |
grubV2 grubVersion = 2 | |
^ | |
actions/archive2disk/v1/pkg/archive/archive.go:61:14: printf: github.com/sirupsen/logrus.Fatalf call has arguments but no formatting directives (govet) | |
log.Fatalf("[ERROR] New gzip reader:", err) | |
^ | |
actions/archive2disk/v1/pkg/archive/archive.go:42:11: ineffectual assignment to err (ineffassign) | |
absPath, err := filepath.Abs(path) | |
^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment