Home
last modified time | relevance | path

Searched +full:rustfmt +full:- +full:clippy (Results 1 – 25 of 258) sorted by relevance

1234567891011

/third_party/rust/rust/src/tools/clippy/tests/ui/
Dcfg_attr_rustfmt.rs1 //@run-rustfix
4 #![allow(unused, clippy::no_effect, clippy::unnecessary_operation)]
5 #![warn(clippy::deprecated_cfg_attr)]
8 #![cfg_attr(rustfmt, rustfmt_skip)]
10 #[rustfmt::skip]
18 #[cfg_attr(rustfmt, rustfmt::skip)] in skip_on_statements()
22 #[cfg_attr(rustfmt, rustfmt_skip)]
28 #![cfg_attr(rustfmt, rustfmt_skip)]
33 #[clippy::msrv = "1.29"]
35 #[cfg_attr(rustfmt, rustfmt::skip)] in msrv_1_29()
[all …]
Dcfg_attr_rustfmt.fixed1 //@run-rustfix
4 #![allow(unused, clippy::no_effect, clippy::unnecessary_operation)]
5 #![warn(clippy::deprecated_cfg_attr)]
8 #![cfg_attr(rustfmt, rustfmt_skip)]
10 #[rustfmt::skip]
18 #[rustfmt::skip]
22 #[rustfmt::skip]
28 #![cfg_attr(rustfmt, rustfmt_skip)]
33 #[clippy::msrv = "1.29"]
35 #[cfg_attr(rustfmt, rustfmt::skip)]
[all …]
Dunused_unit.fixed1 //@run-rustfix
11 #![rustfmt::skip]
13 #![deny(clippy::unused_unit)]
15 #![allow(clippy::from_over_into)]
19 #[allow(clippy::no_effect)]
28 #[rustfmt::skip]
50 #[allow(clippy::needless_return)]
51 #[allow(clippy::never_loop)]
52 #[allow(clippy::unit_cmp)]
63 // https://github.com/rust-lang/rust-clippy/issues/4076
[all …]
Dunused_unit.rs1 //@run-rustfix
11 #![rustfmt::skip]
13 #![deny(clippy::unused_unit)]
15 #![allow(clippy::from_over_into)]
19 #[allow(clippy::no_effect)]
20 pub fn get_unit<F: Fn() -> (), G>(&self, f: F, _g: G) -> () in get_unit()
21 where G: Fn() -> () { in get_unit()
22 let _y: &dyn Fn() -> () = &f; in get_unit()
28 #[rustfmt::skip]
29 fn into(self) -> () { in into()
[all …]
Dneedless_question_mark.fixed1 //@run-rustfix
3 #![warn(clippy::needless_question_mark)]
5 clippy::needless_return,
6 clippy::unnecessary_unwrap,
7 clippy::upper_case_acronyms,
20 fn simple_option_bad1(to: TO) -> Option<usize> {
25 // formatting will add a semi-colon, which would make
27 #[rustfmt::skip]
28 fn simple_option_bad2(to: TO) -> Option<usize> {
33 fn simple_option_bad3(to: TO) -> Option<usize> {
[all …]
Dmanual_async_fn.fixed1 //@run-rustfix
2 #![warn(clippy::manual_async_fn)]
3 #![allow(clippy::needless_pub_self, unused)]
7 async fn fut() -> i32 { 42 }
9 #[rustfmt::skip]
10 async fn fut2() -> i32 { 42 }
12 #[rustfmt::skip]
13 async fn fut3() -> i32 { 42 }
17 #[rustfmt::skip]
20 #[rustfmt::skip]
[all …]
Dsingle_match_else.rs1 //@run-rustfix
2 //@aux-build: proc_macros.rs:proc-macro
3 #![warn(clippy::single_match_else)]
4 #![allow(unused, clippy::needless_return, clippy::no_effect, clippy::uninlined_format_args)]
16 fn unwrap_addr() -> Option<&'static ExprNode> { in unwrap_addr()
47 #[rustfmt::skip]
156 #[rustfmt::skip] in issue_10808()
174 #[rustfmt::skip] in issue_10808()
185 #[rustfmt::skip] in issue_10808()
192 #[rustfmt::skip] in issue_10808()
Dneedless_question_mark.rs1 //@run-rustfix
3 #![warn(clippy::needless_question_mark)]
5 clippy::needless_return,
6 clippy::unnecessary_unwrap,
7 clippy::upper_case_acronyms,
20 fn simple_option_bad1(to: TO) -> Option<usize> { in simple_option_bad1()
25 // formatting will add a semi-colon, which would make
27 #[rustfmt::skip]
28 fn simple_option_bad2(to: TO) -> Option<usize> { in simple_option_bad2()
33 fn simple_option_bad3(to: TO) -> Option<usize> { in simple_option_bad3()
[all …]
Dsemicolon_if_nothing_returned.rs1 #![warn(clippy::semicolon_if_nothing_returned)]
2 #![allow(clippy::redundant_closure, clippy::uninlined_format_args)]
20 #[rustfmt::skip]
27 #[rustfmt::skip]
79 #[rustfmt::skip]
102 #[rustfmt::skip]
113 fn function_returning_option() -> Option<i32> { in function_returning_option()
Dneedless_return.fixed1 //@run-rustfix
7 clippy::if_same_then_else,
8 clippy::single_match,
9 clippy::needless_bool,
10 clippy::equatable_if_let,
11 clippy::needless_else
13 #![warn(clippy::needless_return)]
23 fn test_end_of_fn() -> bool {
31 fn test_no_semicolon() -> bool {
35 #[rustfmt::skip]
[all …]
Dmanual_async_fn.rs1 //@run-rustfix
2 #![warn(clippy::manual_async_fn)]
3 #![allow(clippy::needless_pub_self, unused)]
7 fn fut() -> impl Future<Output = i32> { in fut()
11 #[rustfmt::skip]
12 fn fut2() ->impl Future<Output = i32> { in fut2()
16 #[rustfmt::skip]
17 fn fut3()-> impl Future<Output = i32> { in fut3()
21 fn empty_fut() -> impl Future<Output = ()> { in empty_fut()
25 #[rustfmt::skip]
[all …]
Dsingle_match_else.fixed1 //@run-rustfix
2 //@aux-build: proc_macros.rs:proc-macro
3 #![warn(clippy::single_match_else)]
4 #![allow(unused, clippy::needless_return, clippy::no_effect, clippy::uninlined_format_args)]
16 fn unwrap_addr() -> Option<&'static ExprNode> {
44 #[rustfmt::skip]
146 #[rustfmt::skip]
157 #[rustfmt::skip]
164 #[rustfmt::skip]
Dimplicit_return.fixed1 //@run-rustfix
3 #![warn(clippy::implicit_return)]
4 #![allow(clippy::needless_return, clippy::needless_bool, unused, clippy::never_loop)]
6 fn test_end_of_fn() -> bool {
15 fn test_if_block() -> bool {
19 #[rustfmt::skip]
20 fn test_match(x: bool) -> bool {
27 fn test_match_with_unreachable(x: bool) -> bool {
34 fn test_loop() -> bool {
40 fn test_loop_with_block() -> bool {
[all …]
Dimplicit_return.rs1 //@run-rustfix
3 #![warn(clippy::implicit_return)]
4 #![allow(clippy::needless_return, clippy::needless_bool, unused, clippy::never_loop)]
6 fn test_end_of_fn() -> bool { in test_end_of_fn()
15 fn test_if_block() -> bool { in test_if_block()
19 #[rustfmt::skip]
20 fn test_match(x: bool) -> bool { in test_match()
27 fn test_match_with_unreachable(x: bool) -> bool { in test_match_with_unreachable()
34 fn test_loop() -> bool { in test_loop()
40 fn test_loop_with_block() -> bool { in test_loop_with_block()
[all …]
Dneedless_return.rs1 //@run-rustfix
7 clippy::if_same_then_else,
8 clippy::single_match,
9 clippy::needless_bool,
10 clippy::equatable_if_let,
11 clippy::needless_else
13 #![warn(clippy::needless_return)]
23 fn test_end_of_fn() -> bool { in test_end_of_fn()
31 fn test_no_semicolon() -> bool { in test_no_semicolon()
35 #[rustfmt::skip]
[all …]
/third_party/rust/crates/env_logger/.github/workflows/
Dci.yml10 - main
22 needs: [test, msrv, docs, rustfmt, clippy]
23 runs-on: ubuntu-latest
25 - name: Done
31 os: ["ubuntu-latest", "windows-latest", "macos-latest"]
33 continue-on-error: ${{ matrix.rust != 'stable' }}
34 runs-on: ${{ matrix.os }}
36 - name: Checkout repository
38 - name: Install Rust
39 uses: dtolnay/rust-toolchain@stable
[all …]
/third_party/rust/crates/which-rs/.github/workflows/
Drust.yml7 # Run the `rustfmt` code formatter
8 rustfmt:
9 name: Rustfmt [Formatter]
10 runs-on: ubuntu-latest
12 - name: Setup | Checkout
15 - name: Setup | Rust
16 uses: actions-rs/toolchain@v1
21 components: rustfmt
23 - name: Build | Format
24 run: cargo fmt --all -- --check
[all …]
/third_party/rust/crates/either/.github/workflows/
Dci.yml11 runs-on: ubuntu-latest
13 fail-fast: false
16 - 1.36.0 # MSRV
17 - stable
18 - beta
19 - nightly
21 - ""
22 - "serde"
25 - name: Checkout
28 - name: Set up Rust
[all …]
/third_party/rust/crates/minimal-lexical/docs/
DDevelopment.md13 … made **public** to separate the tests from the implementation, although non-documented members is…
24 - Clippy
25 - Rustfmt
26 - Miri
27 - Valgrind
28 - Tarpaulin
29 - Fuzz
30 - Count
36 rustup +nightly component add clippy
37 rustup +nightly component add rustfmt
[all …]
/third_party/rust/crates/clap/.github/workflows/
Drust-next.yml1 name: rust-next
4 - cron: '3 3 3 * *'
15 - build: stable
16 os: ubuntu-latest
19 - build: linux
20 os: ubuntu-latest
23 - build: windows
24 os: windows-latest
27 - build: mac
28 os: macos-latest
[all …]
Dci.yml7 - cron: '3 3 3 * *'
16 needs: [test, check, docs, rustfmt, clippy, cffconvert]
17 runs-on: ubuntu-latest
19 - name: Done
27 - build: linux
28 os: ubuntu-latest
31 - build: windows
32 os: windows-latest
35 - build: mac
36 os: macos-latest
[all …]
/third_party/rust/rust/tests/rustdoc-ui/intra-doc/
Dissue-111189-resolution-ice.stderr1 error: unresolved link to `rustfmt::skip`
2 --> $DIR/issue-111189-resolution-ice.rs:6:7
4 LL | /// #[rustfmt::skip]
5 | ^^^^^^^^^^^^^ no item named `rustfmt` in scope
8 --> $DIR/issue-111189-resolution-ice.rs:4:9
14 error: unresolved link to `clippy::whatever`
15 --> $DIR/issue-111189-resolution-ice.rs:8:7
17 LL | /// #[clippy::whatever]
18 | ^^^^^^^^^^^^^^^^ no item named `clippy` in scope
/third_party/rust/crates/syn/tests/repo/
Dmod.rs1 #![allow(clippy::manual_assert)]
18 #[rustfmt::skip]
22 "src/tools/clippy/tests/ui/needless_raw_string.rs",
23 "src/tools/clippy/tests/ui/needless_raw_string_hashes.rs",
24 "src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0085_expr_literals.rs",
28 "tests/ui/explicit-tail-calls/return-lifetime-sub.rs",
30 // TODO: non-lifetime binders: `where for<'a, T> &'a Struct<T>: Trait`
32 "src/tools/rustfmt/tests/source/issue_5721.rs",
33 "src/tools/rustfmt/tests/source/non-lifetime-binders.rs",
34 "src/tools/rustfmt/tests/target/issue_5721.rs",
[all …]
/third_party/rust/rust/src/tools/clippy/book/src/development/
Dadding_lints.md3 You are probably here because you want to add a new lint to Clippy. If this is
4 the first time you're contributing to Clippy, this document guides you through
8 because that's clearly a non-descriptive name.
10 - [Adding a new lint](#adding-a-new-lint)
11 - [Setup](#setup)
12 - [Getting Started](#getting-started)
13 - [Defining Our Lint](#defining-our-lint)
14 - [Standalone](#standalone)
15 - [Specific Type](#specific-type)
16 - [Tests Location](#tests-location)
[all …]
/third_party/rust/rust/src/tools/clippy/clippy_dev/src/
Dfmt.rs20 fn from(error: io::Error) -> Self { in from()
26 fn from(error: walkdir::Error) -> Self { in from()
38 #[allow(clippy::missing_panics_doc)]
40 fn try_run(context: &FmtContext) -> Result<bool, CliError> { in run()
45 …// if we added a local rustc repo as path dependency to clippy for rust analyzer, we do NOT want to in run()
46 // format because rustfmt would also format the entire rustc repo as it is a local in run()
49 .expect("Failed to read clippy Cargo.toml") in run()
68 if path.extension() != Some("rs".as_ref()) || entry.file_name() == "ice-3891.rs" { in run()
77 success &= rustfmt(context, chunk)?; in run()
92 eprintln!("error: rustfmt nightly is not installed."); in run()
[all …]

1234567891011