Skip to content

Commit

Permalink
Fix inconsistencies in rustfmt editions on CI and local (kube-rs#1646)
Browse files Browse the repository at this point in the history
* Fix inconsistencies in rustfmt editions on CI and local

We should be using at least edition 2021 everywhere.

Signed-off-by: clux <[email protected]>

* add unfixable deny bans

Signed-off-by: clux <[email protected]>

---------

Signed-off-by: clux <[email protected]>
  • Loading branch information
clux authored Nov 22, 2024
1 parent 08ccc47 commit fa7b7f2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ jobs:
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- run: rustfmt +nightly --edition 2018 --check $(find . -type f -iname *.rs)
- run: rustfmt +nightly --edition 2021 --check $(find . -type f -iname *.rs)
4 changes: 2 additions & 2 deletions .github/workflows/rustfmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ jobs:
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- run: rustfmt +nightly --edition 2018 $(find . -type f -iname *.rs)
- run: rustfmt +nightly --edition 2021 $(find . -type f -iname *.rs)
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
commit-message: rustfmt
signoff: true
title: rustfmt
body: |
Changes from `rustfmt +nightly --edition 2018 $(find . -type f -iname *.rs)`.
Changes from `rustfmt +nightly --edition 2021 $(find . -type f -iname *.rs)`.
branch: rustfmt
# Delete branch when merged
delete-branch: true
6 changes: 6 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,9 @@ name = "miniz_oxide"
name = "thiserror"
[[bans.skip]]
name = "thiserror-impl"

# 2 deps from 2 different version of rustls-native-certs not fully upgradeable yet
[[bans.skip]]
name = "security-framework"
[[bans.skip]]
name = "core-foundation"
2 changes: 2 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# https://github.com/kube-rs/kube/issues/707
unstable_features = true
overflow_delimited_expr = true
newline_style = "Unix"
imports_granularity = "Crate"
Expand Down

0 comments on commit fa7b7f2

Please sign in to comment.