Skip to content

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

Merged
another-rex merged 1 commit intogoogle:mainfrom
ackama:refactor-output-getwd
May 6, 2024
Merged

refactor: encapsulate getting the working directory in a helper function#961
another-rex merged 1 commit intogoogle:mainfrom
ackama:refactor-output-getwd

Conversation

@G-Rath
Copy link
Copy Markdown
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

@G-Rath G-Rath requested review from another-rex, cuixq and hogo6002 May 3, 2024 04:02
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 3, 2024

Codecov Report

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

Project coverage is 63.71%. Comparing base (d34afea) to head (f472991).
Report is 690 commits behind head on main.

Files with missing lines 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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@G-Rath G-Rath force-pushed the refactor-output-getwd branch from e074cb4 to f472991 Compare May 6, 2024 00:37
@another-rex another-rex merged commit cbc9678 into google:main May 6, 2024
@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.

4 participants