Skip to content

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

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 #266

Triggered via pull request December 28, 2023 10:22
@kkekke
synchronize #145
rigtest-to-test
Status Failure
Total duration 37s
Artifacts

golangci-lint.yaml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 10 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#L104
`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: exec/exec.go#L51
exported: exported type Waiter should have comment or be unexported (revive)
Lint: pkg/rigfs/withname.go#L6
exported: exported const OP_CLOSE should have comment (or a comment on this block) or be unexported (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#L23
unused-parameter: parameter 'p' seems to be unused, consider removing or renaming it as _ (revive)
Lint: pkg/rigfs/windir.go#L27
unused-parameter: parameter 'pos' 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/windir.go#L31
unused-parameter: parameter 'p' seems to be unused, consider removing or renaming it as _ (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)