Skip to content

Conversation

@first-vil
Copy link

@first-vil first-vil commented Feb 21, 2024

Overview

I fixed #33

Changed points

  • In main.go, There was a method findInModule that gets relative path from go.mod . I transformed it to a function to reuse it
  • Implemented findPackagePath to calculate the import path, and replaced existing process with it

Confirmation

I confirmed it works on a project structure shown as examples in #33

% gobco # existing version 1.3.2
# github.com/1st-vil/awesomeProject/something_test [github.com/1st-vil/awesomeProject/something.test]
./gobco_bridge_test.go:6:19: undefined: something.GobcoCover
FAIL    github.com/1st-vil/awesomeProject/something [build failed]
FAIL
go test .: exit status 1

% ~/gobco/gobco # executable file created from this PR
ok      github.com/1st-vil/awesomeProject/something     0.457s

Condition coverage: 0/0

@dakusui
Copy link

dakusui commented Sep 25, 2024

Hi!
@rillig (Cc: @junhwi @Pezzah )

Actually, I really want this PR to be merged as my team is experiencing the same problem as #33, where C1 (branch) coverage can't be measured for packages (xyz) that contain a test whose package is xyz_test.
Please let me know if anything that I can help.

Thanks a lot in advance!

FYI: In case you think closed conversation is needed, I sent out a linked in connection invitation. Please accept it and let me know your thought.

@rillig rillig self-requested a review March 16, 2025 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Finding original package path in directory with _test package may fails

2 participants