Skip to content

Commit

Permalink
Enable pedantic lints on test suite in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Nov 5, 2021
1 parent 8f16ac0 commit 1fcda0e
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Expand Up @@ -159,5 +159,5 @@ jobs:
- run: cd serde_derive && cargo clippy -- -Dclippy::all -Dclippy::pedantic
- run: cd serde_derive_internals && cargo clippy -- -Dclippy::all -Dclippy::pedantic
- run: cd serde_test && cargo clippy -- -Dclippy::all -Dclippy::pedantic -Aclippy::redundant_field_names
- run: cd test_suite && cargo clippy --tests --features unstable -- -Dclippy::all -Aclippy::redundant_field_names
- run: cd test_suite/no_std && cargo clippy -- -Dclippy::all -Aclippy::redundant_field_names
- run: cd test_suite && cargo clippy --tests --features unstable -- -Dclippy::all -Dclippy::pedantic -Aclippy::redundant_field_names
- run: cd test_suite/no_std && cargo clippy -- -Dclippy::all -Dclippy::pedantic -Aclippy::redundant_field_names
1 change: 1 addition & 0 deletions test_suite/tests/test_annotations.rs
Expand Up @@ -3,6 +3,7 @@
clippy::from_over_into,
// Clippy bug: https://github.com/rust-lang/rust-clippy/issues/7422
clippy::nonstandard_macro_braces,
clippy::too_many_lines,
clippy::trivially_copy_pass_by_ref
)]

Expand Down
2 changes: 2 additions & 0 deletions test_suite/tests/test_borrow.rs
@@ -1,3 +1,5 @@
#![allow(clippy::items_after_statements, clippy::used_underscore_binding)]

use serde::{Deserialize, Deserializer};
use serde_test::{assert_de_tokens, assert_de_tokens_error, Token};

Expand Down
2 changes: 2 additions & 0 deletions test_suite/tests/test_de.rs
@@ -1,6 +1,8 @@
#![allow(
clippy::decimal_literal_representation,
clippy::empty_enum,
clippy::manual_assert,
clippy::needless_pass_by_value,
clippy::unreadable_literal
)]
#![cfg_attr(feature = "unstable", feature(never_type))]
Expand Down
5 changes: 5 additions & 0 deletions test_suite/tests/test_gen.rs
Expand Up @@ -6,9 +6,14 @@
#![allow(
unknown_lints,
mixed_script_confusables,
clippy::items_after_statements,
clippy::missing_errors_doc,
clippy::missing_panics_doc,
clippy::must_use_candidate,
// Clippy bug: https://github.com/rust-lang/rust-clippy/issues/7422
clippy::nonstandard_macro_braces,
clippy::ptr_arg,
clippy::too_many_lines,
clippy::trivially_copy_pass_by_ref
)]

Expand Down
6 changes: 5 additions & 1 deletion test_suite/tests/test_macros.rs
@@ -1,5 +1,9 @@
#![deny(trivial_numeric_casts)]
#![allow(clippy::enum_variant_names, clippy::redundant_field_names)]
#![allow(
clippy::enum_variant_names,
clippy::redundant_field_names,
clippy::too_many_lines
)]

mod bytes;

Expand Down
2 changes: 2 additions & 0 deletions test_suite/tests/test_self.rs
@@ -1,3 +1,5 @@
#![allow(clippy::used_underscore_binding)]

use serde::{Deserialize, Serialize};

#[test]
Expand Down
2 changes: 2 additions & 0 deletions test_suite/tests/test_serde_path.rs
@@ -1,3 +1,5 @@
#![allow(clippy::type_repetition_in_bounds)]

#[test]
fn test_gen_custom_serde() {
#[derive(serde::Serialize, serde::Deserialize)]
Expand Down
2 changes: 2 additions & 0 deletions test_suite/tests/test_value.rs
@@ -1,3 +1,5 @@
#![allow(clippy::similar_names)]

use serde::de::value::{self, MapAccessDeserializer};
use serde::de::{IntoDeserializer, MapAccess, Visitor};
use serde::{Deserialize, Deserializer};
Expand Down

0 comments on commit 1fcda0e

Please sign in to comment.