Skip to content

Refactor cmd/rigtest into a real test suite in test/rig_test.go and fix found bugs #256

Refactor cmd/rigtest into a real test suite in test/rig_test.go and fix found bugs

Refactor cmd/rigtest into a real test suite in test/rig_test.go and fix found bugs #256

Triggered via pull request December 21, 2023 12:09
@kkekke
synchronize #145
rigtest-to-test
Status Failure
Total duration 45s
Artifacts

golangci-lint.yaml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 9 warnings
Lint: ssh.go#L556
cognitive complexity 32 of func `(*SSH).Exec` is high (> 30) (gocognit)
Lint: pkg/rigfs/winfile.go#L163
commentFormatting: put a space between `//` and comment text (gocritic)
Lint: pkg/rigfs/winfileinfo.go#L10
File is not `gofumpt`-ed (gofumpt)
Lint: pkg/rigfs/winfsys.go#L15
File is not `gofumpt`-ed (gofumpt)
Lint: exec/exec.go#L100
`if o.LogCommand` has complex nested blocks (complexity: 7) (nestif)
Lint: pkg/rigfs/winfile.go#L193
calculated cyclomatic complexity for function command is 15, max is 12 (cyclop)
Lint: os/windows.go#L106
err113: do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"empty content for writing to %s\", path)" (goerr113)
Lint: os/windows.go#L110
err113: do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"empty path for file writing %s\", path)" (goerr113)
Lint: os/windows.go#L210
err113: do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"service scripts not supported on windows\")" (goerr113)
Lint: pkg/rigfs/posixfsys.go#L207
err113: do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"file %s is not open for reading\", f.path)" (goerr113)
Lint: pkg/rigfs/windir.go#L24
unused-parameter: parameter 'p' seems to be unused, consider removing or renaming it as _ (revive)
Lint: pkg/rigfs/windir.go#L28
unused-parameter: parameter 'pos' seems to be unused, consider removing or renaming it as _ (revive)
Lint: pkg/rigfs/withname.go#L6
var-naming: don't use ALL_CAPS in Go names; use CamelCase (revive)
Lint: pkg/rigfs/withname.go#L7
var-naming: don't use ALL_CAPS in Go names; use CamelCase (revive)
Lint: pkg/rigfs/windir.go#L32
unused-parameter: parameter 'p' seems to be unused, consider removing or renaming it as _ (revive)
Lint: pkg/rigfs/withname.go#L8
var-naming: don't use ALL_CAPS in Go names; use CamelCase (revive)
Lint: pkg/rigfs/withname.go#L9
var-naming: don't use ALL_CAPS in Go names; use CamelCase (revive)
Lint: pkg/rigfs/withname.go#L10
var-naming: don't use ALL_CAPS in Go names; use CamelCase (revive)
Lint: pkg/rigfs/withname.go#L11
var-naming: don't use ALL_CAPS in Go names; use CamelCase (revive)