Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: recursively run tests for dir #230

Merged
merged 1 commit into from
Dec 13, 2024
Merged

fix: recursively run tests for dir #230

merged 1 commit into from
Dec 13, 2024

Conversation

fredrikaverpil
Copy link
Owner

@fredrikaverpil fredrikaverpil commented Dec 12, 2024

Why this change?

The current implementation did not take into account:

  • Recursively run tests for given package (in sub-packages).
  • If no exact correlation was found between folder path and package import path, a search for sub-packages is conducted. The result can be used for inferring a proper package import path.

Huge thanks to @damoye for uncovering this rather large bug! ❤️

What was done?

  • Introduce two search strategies for correlating the selected folderpath with a package import path.
  • Append /... at the end of the package import path.

fixes: #228

@fredrikaverpil fredrikaverpil marked this pull request as ready for review December 12, 2024 21:24
@fredrikaverpil fredrikaverpil changed the title fix: recursively run tests for dir without corresponding package fix: recursively run tests for dir Dec 13, 2024
@fredrikaverpil fredrikaverpil enabled auto-merge (squash) December 13, 2024 06:24
@fredrikaverpil fredrikaverpil merged commit 3927ac9 into main Dec 13, 2024
13 checks passed
@fredrikaverpil fredrikaverpil deleted the fix/package branch December 13, 2024 06:24
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.

feature: only run test in package instead of go.mod root
1 participant