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

refactor: encapsulate getting the working directory in a helper function #961

Merged
merged 1 commit into from
May 6, 2024

Conversation

G-Rath
Copy link
Collaborator

@G-Rath G-Rath commented May 3, 2024

This "improves" our coverage artificially since the unhappy path is not coverable and this reduces us from three uncoverable lines to one.

I think this is worth doing as it feels more representative especially since we're panicking meaning we consider this a very unlikely and "on fire" situation, so we're hiding that within a particular function whose name makes that clear a la regexp.MustCompile

@codecov-commenter
Copy link

codecov-commenter commented May 3, 2024

Codecov Report

Attention: Patch coverage is 70.00000% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 63.71%. Comparing base (d34afea) to head (f472991).

Files Patch % Lines
internal/output/result.go 50.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #961      +/-   ##
==========================================
+ Coverage   63.67%   63.71%   +0.03%     
==========================================
  Files         146      146              
  Lines       11960    11958       -2     
==========================================
+ Hits         7616     7619       +3     
+ Misses       3878     3875       -3     
+ Partials      466      464       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@another-rex another-rex merged commit cbc9678 into google:main May 6, 2024
13 checks passed
@G-Rath G-Rath deleted the refactor-output-getwd branch May 6, 2024 22:07
josieang pushed a commit to josieang/osv-scanner that referenced this pull request Jun 6, 2024
…ion (google#961)

This "improves" our coverage artificially since the unhappy path is not
coverable and this reduces us from three uncoverable lines to one.

I think this is worth doing as it feels more representative especially
since we're panicking meaning we consider this a very unlikely and "on
fire" situation, so we're hiding that within a particular function whose
name makes that clear a la `regexp.MustCompile`
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.

None yet

4 participants