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

SM-1091: Use rustfmt Nightly by Default #560

Closed
wants to merge 1 commit into from
Closed

Conversation

coltonhurst
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

This PR is a proposal to add a rust-toolchain.toml file to the repository, and use rustfmt nightly by default due to #512.

Code changes

  • rust-toolchain.toml: Adds this file

Before you submit

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

@coltonhurst coltonhurst self-assigned this Jan 29, 2024
Copy link

codecov bot commented Jan 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3064ac5) 51.65% compared to head (88af9b7) 52.48%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #560      +/-   ##
==========================================
+ Coverage   51.65%   52.48%   +0.82%     
==========================================
  Files         163      161       -2     
  Lines        8202     8113      -89     
==========================================
+ Hits         4237     4258      +21     
+ Misses       3965     3855     -110     

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

@coltonhurst coltonhurst marked this pull request as draft January 30, 2024 01:52
@dani-garcia
Copy link
Member

I don't think there's a way to write a rust-toolchain file to force nightly rustfmt but stable compiler, which is what we should prefer to use, I think.

At the moment I changed my VSCode config to run nightly rustfmt: "rust-analyzer.rustfmt.extraArgs": "+nightly", and just use shell aliases for running cargo +nightly fmt, not great but it works.

@coltonhurst
Copy link
Member Author

I don't think there's a way to write a rust-toolchain file to force nightly rustfmt but stable compiler, which is what we should prefer to use, I think.

At the moment I changed my VSCode config to run nightly rustfmt: "rust-analyzer.rustfmt.extraArgs": "+nightly", and just use shell aliases for running cargo +nightly fmt, not great but it works.

Bummer, was trying to experiment with this and see if there was a way to do it. Thanks for the tips, I'll use that!

@coltonhurst coltonhurst deleted the sm/sm-1091 branch January 30, 2024 14:42
@bitwarden-bot
Copy link

Logo
Checkmarx One – Scan Summary & Details13fdfaaa-bc87-4fc5-ab61-499b04eea0b3

Fixed Issues

Severity Issue Source File / Package
HIGH Command_Injection /languages/python/example.py: 66
HIGH Command_Injection /languages/python/example.py: 35
HIGH Missing User Instruction /Dockerfile: 23
HIGH Reflected_XSS /languages/kotlin/app/src/main/java/com/bitwarden/myapplication/MainActivity.kt: 379
MEDIUM Apt Get Install Pin Version Not Defined /Dockerfile: 9
MEDIUM Privacy_Violation /languages/java/Example.java: 12
MEDIUM Privacy_Violation /languages/java/src/main/java/com/bitwarden/sdk/SecretsClient.java: 40
MEDIUM Privacy_Violation /languages/java/Example.java: 13
MEDIUM Unchecked_Input_for_Loop_Condition /languages/kotlin/app/src/main/java/com/bitwarden/myapplication/MainActivity.kt: 379
MEDIUM Unpinned Actions Full Length Commit SHA /build-cli-docker.yml: 151
MEDIUM Unpinned Actions Full Length Commit SHA /build-cli-docker.yml: 68
MEDIUM Unpinned Actions Full Length Commit SHA /release-cli.yml: 137
MEDIUM Unpinned Actions Full Length Commit SHA /release-cli.yml: 78
MEDIUM Unpinned Actions Full Length Commit SHA /release-napi.yml: 50
MEDIUM Unpinned Actions Full Length Commit SHA /publish-rust-crates.yml: 134
MEDIUM Unpinned Actions Full Length Commit SHA /release-napi.yml: 135
MEDIUM Unpinned Actions Full Length Commit SHA /build-cli-docker.yml: 75
MEDIUM Unpinned Actions Full Length Commit SHA /release-cli.yml: 61
MEDIUM Unpinned Actions Full Length Commit SHA /release-napi.yml: 104
MEDIUM Unpinned Actions Full Length Commit SHA /version-bump.yml: 52
MEDIUM Using Platform Flag with FROM Command /Dockerfile: 4
LOW Healthcheck Instruction Missing /Dockerfile: 23
LOW Missing_CSP_Header /about.hbs: 48

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.

3 participants