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

Wrap rust comments #512

Merged
merged 11 commits into from
Jan 22, 2024
Merged

Wrap rust comments #512

merged 11 commits into from
Jan 22, 2024

Conversation

Hinton
Copy link
Member

@Hinton Hinton commented Jan 16, 2024

Type of change

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

Objective

Add a rustfmt.toml config with the following options:

  • comment_width: 100
  • wrap_comments: true
  • group_imports: "StdExternalCrate"
  • imports_granularity: "Crate"

This sorts and groups imports. And wraps long comments. Unfortunately all of these configs are "unstable" and we need nightly cargo-fmt in order to run them.

Before you submit

  • Please add unit tests where it makes sense to do so

Copy link

codecov bot commented Jan 16, 2024

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (785e7c4) 50.07% compared to head (efcdde5) 50.08%.

Files Patch % Lines
crates/bitwarden-napi/src/client.rs 0.00% 2 Missing ⚠️
crates/bitwarden/src/vault/cipher/attachment.rs 0.00% 2 Missing ⚠️
crates/bws/src/render.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #512   +/-   ##
=======================================
  Coverage   50.07%   50.08%           
=======================================
  Files         161      161           
  Lines        7874     7881    +7     
=======================================
+ Hits         3943     3947    +4     
- Misses       3931     3934    +3     

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

@Hinton Hinton marked this pull request as ready for review January 18, 2024 10:09
@Hinton Hinton requested a review from a team as a code owner January 18, 2024 10:09
@Hinton Hinton requested a review from dani-garcia January 18, 2024 10:09
dani-garcia
dani-garcia previously approved these changes Jan 18, 2024
vgrassia
vgrassia previously approved these changes Jan 18, 2024
@Hinton Hinton dismissed stale reviews from vgrassia and dani-garcia via c13098c January 19, 2024 09:38
# Conflicts:
#	crates/bitwarden-generators/src/passphrase.rs
#	crates/bitwarden-generators/src/password.rs
#	crates/bitwarden/src/tool/generators/username_forwarders/forwardemail.rs
@Hinton Hinton enabled auto-merge (squash) January 19, 2024 09:39
dani-garcia
dani-garcia previously approved these changes Jan 19, 2024
@bitwarden-bot
Copy link

Logo
Checkmarx One – Scan Summary & Details8c3fc054-a9bb-4f0a-8d22-286721b8a13d

No New Or Fixed Issues Found

@Hinton Hinton merged commit 0e9b64f into main Jan 22, 2024
60 checks passed
@Hinton Hinton deleted the ps/rustfmt branch January 22, 2024 14:32
coltonhurst added a commit that referenced this pull request Mar 25, 2024
## Type of change

<!-- (mark with an `X`) -->

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

## Objective

<!--Describe what the purpose of this PR is. For example: what bug
you're fixing or what new feature you're adding-->

Add a note about the required nightly toolchain. Without this people
will receive an error when attempting to run the `build-api.sh` script.

For posterity, the nightly toolchain is required for certain features
deemed unsafe. You can find more info here:
#512

## Code changes

<!--Explain the changes you've made to each file or major component.
This should help the reviewer understand your changes-->
<!--Also refer to any related changes or PRs in other repositories-->

- **README.md:** Add nightly install instructions

## Before you submit

- Please add **unit tests** where it makes sense to do so
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