Skip to content

Commit

Permalink
CI/Makefile: disable uninlined_format_args clippy lint
Browse files Browse the repository at this point in the history
New version of clippy introduced the `uninlined_format_args` lint which
recommends putting variable names directly into format strings, like
this:

    let what = "world";
    println!("Hello, {what}!");

    // Instead of:
    println!("Hello, {}!", what);

The problem with this feature is that rust-analyzer does not support
renaming variables inside format strings yet. The lint has been
downgraded to pedantic level and will most likely appear as such in the
next release.

This commit disables the new lint in the CI and local Makefile. We can
turn it on again after this feature gets better support from
rust-analyzer.
  • Loading branch information
piodul authored and cvybhu committed Feb 3, 2023
1 parent 9a80008 commit 4964b44
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Format check
run: cargo fmt --verbose --all -- --check
- name: Clippy check
run: cargo clippy --verbose --examples --tests
run: cargo clippy --verbose --examples --tests -- -Aclippy::uninlined_format_args
- name: Cargo check without features
run: cargo check --manifest-path "scylla/Cargo.toml" --features ""
- name: Cargo check with secrecy feature
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ check-without-features:

.PHONY: clippy
clippy:
RUSTFLAGS=-Dwarnings cargo clippy --examples --tests
RUSTFLAGS=-Dwarnings cargo clippy --examples --tests -- -Aclippy::uninlined_format_args

.PHONY: test
test: up wait-for-cluster
Expand Down

0 comments on commit 4964b44

Please sign in to comment.