Skip to content

Add lint workflow

Add lint workflow #6

Triggered via pull request October 10, 2024 18:47
@cheshire137cheshire137
synchronize #10
go-linter
Status Failure
Total duration 39s
Artifacts

lint.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 2 warnings
lint: cmd/run/run.go#L191
Function name: NewRunCommand, Cyclomatic Complexity: 50, Halstead Volume: 6931.94, Maintainability Index: 13 (maintidx)
lint: cmd/run/run.go#L313
`if strings.HasPrefix(prompt, "/")` has complex nested blocks (complexity: 15) (nestif)
lint: cmd/run/run.go#L391
deferInLoop: Possible resource leak, 'defer' is called in the 'for' loop (gocritic)
lint: cmd/run/run.go#L398
deferInLoop: Possible resource leak, 'defer' is called in the 'for' loop (gocritic)
lint: internal/azuremodels/client.go#L56
should rewrite http.NewRequestWithContext or add (*Request).WithContext (noctx)
lint: internal/azuremodels/client.go#L97
should rewrite http.NewRequestWithContext or add (*Request).WithContext (noctx)
lint: internal/azuremodels/client.go#L186
should rewrite http.NewRequestWithContext or add (*Request).WithContext (noctx)
lint: internal/sse/mockeventreader.go#L10
Comment should end in a period (godot)
lint: internal/sse/mockeventreader.go#L18
exported: exported function NewMockEventReader should have comment or be unexported (revive)
lint: internal/sse/mockeventreader.go#L35
exported: exported method MockEventReader.Close should have comment or be unexported (revive)
lint
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions/setup-go@v4, golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
lint
Restore cache failed: Dependencies file is not found in /home/runner/work/gh-models/gh-models. Supported file pattern: go.sum