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

Forbid unwrap usage outside of tests #693

Merged
merged 3 commits into from
Apr 5, 2024
Merged

Forbid unwrap usage outside of tests #693

merged 3 commits into from
Apr 5, 2024

Conversation

dani-garcia
Copy link
Member

Type of change

- [ ] Bug fix
- [ ] New feature development
- [x] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other

Objective

Replaced uses of unwrap by ? or .expect(), and added lint to forbid them outside of tests.

Copy link
Contributor

github-actions bot commented Apr 3, 2024

Logo
Checkmarx One – Scan Summary & Detailsd37ebac7-f426-4745-89b3-99684c890c72

No New Or Fixed Issues Found

Copy link

codecov bot commented Apr 3, 2024

Codecov Report

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

Project coverage is 60.70%. Comparing base (a408745) to head (6174768).
Report is 1 commits behind head on main.

Files Patch % Lines
crates/bws/src/render.rs 0.00% 6 Missing ⚠️
crates/bitwarden-c/src/c.rs 0.00% 4 Missing ⚠️
crates/bws/src/state.rs 0.00% 4 Missing ⚠️
crates/bitwarden/src/util.rs 25.00% 3 Missing ⚠️
crates/bws/src/config.rs 70.00% 3 Missing ⚠️
...rates/bitwarden-crypto/src/enc_string/symmetric.rs 66.66% 1 Missing ⚠️
crates/bitwarden-json/src/response.rs 0.00% 1 Missing ⚠️
crates/bitwarden/src/auth/login/auth_request.rs 0.00% 1 Missing ⚠️
crates/bitwarden/src/client/client.rs 92.30% 1 Missing ⚠️
crates/bws/src/main.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #693      +/-   ##
==========================================
- Coverage   60.71%   60.70%   -0.01%     
==========================================
  Files         173      173              
  Lines       10513    10518       +5     
==========================================
+ Hits         6383     6385       +2     
- Misses       4130     4133       +3     

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

@dani-garcia dani-garcia marked this pull request as ready for review April 3, 2024 13:49
@dani-garcia dani-garcia requested a review from Hinton April 3, 2024 13:49
crates/bws/src/config.rs Outdated Show resolved Hide resolved
Hinton
Hinton previously approved these changes Apr 5, 2024
crates/bws/src/state.rs Outdated Show resolved Hide resolved
@dani-garcia dani-garcia merged commit 423d971 into main Apr 5, 2024
77 checks passed
@dani-garcia dani-garcia deleted the ps/forbid-unwrap branch April 5, 2024 11:56
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.

2 participants