Repository navigation
test: sonda do check go com import quebrado (não mergear) - #210
gomessguii wants to merge 1 commit into
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds a non-mergeable CI probe whose unresolved test-only import should leave go build passing while causing go vet and the Go check to fail, validating the third CRM-405 criterion. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="pkg/utils/ci_probe_test.go" line_range="6" />
<code_context>
+import (
+ "testing"
+
+ _ "github.com/evolution-foundation/evolution-go/pkg/config"
+)
+
</code_context>
<issue_to_address>
**issue (bug_risk):** The test package imports a module path that does not match the repository's `go.mod` module path, so `go vet ./...` fails while loading `pkg/utils`, and `go test ./...` fails for the same unresolved import.
**Triggers:** When CI runs `go vet ./...` or `go test ./...`.
**Suggested fix:** Remove this probe after the check is verified, or replace the import with the valid `github.com/EvolutionAPI/evolution-go/pkg/config` path for a passing test.
```suggestion
_ "github.com/EvolutionAPI/evolution-go/pkg/config"
```
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: pkg/utils/ci_probe_test.go:6
| import ( | ||
| "testing" | ||
|
|
||
| _ "github.com/evolution-foundation/evolution-go/pkg/config" |
There was a problem hiding this comment.
issue (bug_risk): The test package imports a module path that does not match the repository's go.mod module path, so go vet ./... fails while loading pkg/utils, and go test ./... fails for the same unresolved import.
Triggers: When CI runs go vet ./... or go test ./....
Suggested fix: Remove this probe after the check is verified, or replace the import with the valid github.com/EvolutionAPI/evolution-go/pkg/config path for a passing test.
| _ "github.com/evolution-foundation/evolution-go/pkg/config" | |
| _ "github.com/EvolutionAPI/evolution-go/pkg/config" |
|
Sonda concluída: |
Pull request de teste. Não fazer merge: será fechado assim que o check terminar.
Prova em runner real do terceiro critério do CRM-405: um
_test.gocom import que não resolve tem que reprovar o pull request.O único arquivo adicionado,
pkg/utils/ci_probe_test.go, importagithub.com/evolution-foundation/evolution-go/pkg/config, que não existe neste module path (github.com/EvolutionAPI/evolution-go). O resultado esperado égo build ./...passar,go vet ./...reprovar e o checkgoficar vermelho, bloqueando o merge.Summary by Sourcery
Verify that the Go CI check blocks pull requests when test files contain unresolved imports.
CI:
Tests: