From 987ddd210b15d61cfe10fc69f849a2f8b6106045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Juli=C3=A1n=20Espina?= Date: Tue, 26 Sep 2023 00:00:54 +0000 Subject: [PATCH] Replace #[deny] with #[warn] (#3309) * Change deny lints to warn lints * Deny warnings on CI --- .github/workflows/rust.yml | 2 ++ .github/workflows/webassembly.yml | 1 + boa_ast/src/lib.rs | 7 +++++-- boa_cli/src/main.rs | 7 +++++-- boa_engine/src/lib.rs | 7 +++++-- boa_gc/src/lib.rs | 9 ++++++--- boa_icu_provider/src/lib.rs | 7 ++++++- boa_interner/src/lib.rs | 8 ++++++-- boa_macros/src/lib.rs | 7 +++++-- boa_parser/src/lib.rs | 7 +++++-- boa_profiler/src/lib.rs | 7 +++++-- boa_runtime/src/lib.rs | 8 +++++--- boa_tester/src/main.rs | 7 +++++-- boa_wasm/src/lib.rs | 7 +++++-- 14 files changed, 66 insertions(+), 25 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 967f16597a6..a0017a908a2 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -70,6 +70,8 @@ jobs: name: Misc runs-on: ubuntu-latest timeout-minutes: 60 + env: + RUSTFLAGS: -D warnings steps: - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1.0.7 diff --git a/.github/workflows/webassembly.yml b/.github/workflows/webassembly.yml index 7e2b5044cd3..1a7f47d531f 100644 --- a/.github/workflows/webassembly.yml +++ b/.github/workflows/webassembly.yml @@ -27,6 +27,7 @@ jobs: timeout-minutes: 60 env: WASM_PACK_PATH: ~/.cargo/bin/wasm-pack + RUSTFLAGS: -D warnings steps: - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1.0.7 diff --git a/boa_ast/src/lib.rs b/boa_ast/src/lib.rs index 039e3eb03ed..2a8430d4b98 100644 --- a/boa_ast/src/lib.rs +++ b/boa_ast/src/lib.rs @@ -18,8 +18,7 @@ html_favicon_url = "https://raw.githubusercontent.com/boa-dev/boa/main/assets/logo.svg" )] #![cfg_attr(not(test), forbid(clippy::unwrap_used))] -#![warn(missing_docs, clippy::dbg_macro)] -#![deny( +#![warn( // rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html warnings, future_incompatible, @@ -31,6 +30,7 @@ unused, // rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html + missing_docs, macro_use_extern_crate, meta_variable_misuse, missing_abi, @@ -59,6 +59,9 @@ rustdoc::invalid_rust_codeblocks, rustdoc::bare_urls, + // clippy allowed by default + clippy::dbg_macro, + // clippy categories https://doc.rust-lang.org/clippy/ clippy::all, clippy::correctness, diff --git a/boa_cli/src/main.rs b/boa_cli/src/main.rs index da705e54b11..910b42841d9 100644 --- a/boa_cli/src/main.rs +++ b/boa_cli/src/main.rs @@ -6,8 +6,7 @@ html_favicon_url = "https://raw.githubusercontent.com/boa-dev/boa/main/assets/logo.svg" )] #![cfg_attr(not(test), deny(clippy::unwrap_used))] -#![warn(missing_docs, clippy::dbg_macro)] -#![deny( +#![warn( // rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html warnings, future_incompatible, @@ -19,6 +18,7 @@ unused, // rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html + missing_docs, macro_use_extern_crate, meta_variable_misuse, missing_abi, @@ -47,6 +47,9 @@ rustdoc::invalid_rust_codeblocks, rustdoc::bare_urls, + // clippy allowed by default + clippy::dbg_macro, + // clippy categories https://doc.rust-lang.org/clippy/ clippy::all, clippy::correctness, diff --git a/boa_engine/src/lib.rs b/boa_engine/src/lib.rs index 1bd2c463463..b6fc3edb609 100644 --- a/boa_engine/src/lib.rs +++ b/boa_engine/src/lib.rs @@ -52,8 +52,7 @@ html_favicon_url = "https://raw.githubusercontent.com/boa-dev/boa/main/assets/logo.svg" )] #![cfg_attr(not(test), forbid(clippy::unwrap_used))] -#![warn(missing_docs, clippy::dbg_macro)] -#![deny( +#![warn( // rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html warnings, future_incompatible, @@ -65,6 +64,7 @@ unused, // rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html + missing_docs, macro_use_extern_crate, meta_variable_misuse, missing_abi, @@ -93,6 +93,9 @@ rustdoc::invalid_rust_codeblocks, rustdoc::bare_urls, + // clippy allowed by default + clippy::dbg_macro, + // clippy categories https://doc.rust-lang.org/clippy/ clippy::all, clippy::correctness, diff --git a/boa_gc/src/lib.rs b/boa_gc/src/lib.rs index ba5c18c5148..d6b1d5155ec 100644 --- a/boa_gc/src/lib.rs +++ b/boa_gc/src/lib.rs @@ -10,8 +10,7 @@ html_favicon_url = "https://raw.githubusercontent.com/boa-dev/boa/main/assets/logo.svg" )] #![cfg_attr(not(test), forbid(clippy::unwrap_used))] -#![warn(missing_docs, clippy::dbg_macro)] -#![deny( +#![warn( // rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html warnings, future_incompatible, @@ -23,6 +22,7 @@ unused, // rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html + missing_docs, macro_use_extern_crate, meta_variable_misuse, missing_abi, @@ -51,6 +51,10 @@ rustdoc::invalid_rust_codeblocks, rustdoc::bare_urls, + // clippy allowed by default + clippy::dbg_macro, + clippy::undocumented_unsafe_blocks, + // clippy categories https://doc.rust-lang.org/clippy/ clippy::all, clippy::correctness, @@ -60,7 +64,6 @@ clippy::perf, clippy::pedantic, clippy::nursery, - clippy::undocumented_unsafe_blocks )] #![allow( clippy::module_name_repetitions, diff --git a/boa_icu_provider/src/lib.rs b/boa_icu_provider/src/lib.rs index d73c83737ef..9443067cb21 100644 --- a/boa_icu_provider/src/lib.rs +++ b/boa_icu_provider/src/lib.rs @@ -19,7 +19,7 @@ html_logo_url = "https://raw.githubusercontent.com/boa-dev/boa/main/assets/logo.svg", html_favicon_url = "https://raw.githubusercontent.com/boa-dev/boa/main/assets/logo.svg" )] -#![deny( +#![warn( // rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html warnings, future_incompatible, @@ -31,6 +31,7 @@ unused, // rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html + missing_docs, macro_use_extern_crate, meta_variable_misuse, missing_abi, @@ -41,6 +42,7 @@ single_use_lifetimes, trivial_casts, trivial_numeric_casts, + unreachable_pub, unsafe_op_in_unsafe_fn, unused_import_braces, unused_lifetimes, @@ -57,6 +59,9 @@ rustdoc::invalid_rust_codeblocks, rustdoc::bare_urls, + // clippy allowed by default + clippy::dbg_macro, + // clippy categories https://doc.rust-lang.org/clippy/ clippy::all, clippy::correctness, diff --git a/boa_interner/src/lib.rs b/boa_interner/src/lib.rs index 346d62a8224..a76b2589ac0 100644 --- a/boa_interner/src/lib.rs +++ b/boa_interner/src/lib.rs @@ -16,8 +16,7 @@ html_favicon_url = "https://raw.githubusercontent.com/boa-dev/boa/main/assets/logo.svg" )] #![cfg_attr(not(test), forbid(clippy::unwrap_used))] -#![warn(missing_docs, clippy::dbg_macro)] -#![deny( +#![warn( // rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html warnings, future_incompatible, @@ -29,6 +28,7 @@ unused, // rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html + missing_docs, macro_use_extern_crate, meta_variable_misuse, missing_abi, @@ -36,6 +36,7 @@ missing_debug_implementations, non_ascii_idents, noop_method_call, + single_use_lifetimes, trivial_casts, trivial_numeric_casts, unreachable_pub, @@ -56,6 +57,9 @@ rustdoc::invalid_rust_codeblocks, rustdoc::bare_urls, + // clippy allowed by default + clippy::dbg_macro, + // clippy categories https://doc.rust-lang.org/clippy/ clippy::all, clippy::correctness, diff --git a/boa_macros/src/lib.rs b/boa_macros/src/lib.rs index 4f9ce0f7e68..c4124f8176f 100644 --- a/boa_macros/src/lib.rs +++ b/boa_macros/src/lib.rs @@ -6,8 +6,7 @@ html_favicon_url = "https://raw.githubusercontent.com/boa-dev/boa/main/assets/logo.svg" )] #![cfg_attr(not(test), forbid(clippy::unwrap_used))] -#![warn(missing_docs, clippy::dbg_macro)] -#![deny( +#![warn( // rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html warnings, future_incompatible, @@ -19,6 +18,7 @@ unused, // rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html + missing_docs, macro_use_extern_crate, meta_variable_misuse, missing_abi, @@ -47,6 +47,9 @@ rustdoc::invalid_rust_codeblocks, rustdoc::bare_urls, + // clippy allowed by default + clippy::dbg_macro, + // clippy categories https://doc.rust-lang.org/clippy/ clippy::all, clippy::correctness, diff --git a/boa_parser/src/lib.rs b/boa_parser/src/lib.rs index 99dc0f3fc85..deb62896602 100644 --- a/boa_parser/src/lib.rs +++ b/boa_parser/src/lib.rs @@ -16,8 +16,7 @@ html_favicon_url = "https://raw.githubusercontent.com/boa-dev/boa/main/assets/logo.svg" )] #![cfg_attr(not(test), forbid(clippy::unwrap_used))] -#![warn(missing_docs, clippy::dbg_macro)] -#![deny( +#![warn( // rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html warnings, future_incompatible, @@ -29,6 +28,7 @@ unused, // rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html + missing_docs, macro_use_extern_crate, meta_variable_misuse, missing_abi, @@ -57,6 +57,9 @@ rustdoc::invalid_rust_codeblocks, rustdoc::bare_urls, + // clippy allowed by default + clippy::dbg_macro, + // clippy categories https://doc.rust-lang.org/clippy/ clippy::all, clippy::correctness, diff --git a/boa_profiler/src/lib.rs b/boa_profiler/src/lib.rs index b4a39c3e4aa..bc39c683825 100644 --- a/boa_profiler/src/lib.rs +++ b/boa_profiler/src/lib.rs @@ -13,8 +13,7 @@ html_favicon_url = "https://raw.githubusercontent.com/boa-dev/boa/main/assets/logo.svg" )] #![cfg_attr(not(test), forbid(clippy::unwrap_used))] -#![warn(missing_docs, clippy::dbg_macro)] -#![deny( +#![warn( // rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html warnings, future_incompatible, @@ -26,6 +25,7 @@ unused, // rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html + missing_docs, macro_use_extern_crate, meta_variable_misuse, missing_abi, @@ -54,6 +54,9 @@ rustdoc::invalid_rust_codeblocks, rustdoc::bare_urls, + // clippy allowed by default + clippy::dbg_macro, + // clippy categories https://doc.rust-lang.org/clippy/ clippy::all, clippy::correctness, diff --git a/boa_runtime/src/lib.rs b/boa_runtime/src/lib.rs index 84cbe241a8a..907bfa91277 100644 --- a/boa_runtime/src/lib.rs +++ b/boa_runtime/src/lib.rs @@ -46,8 +46,7 @@ html_favicon_url = "https://raw.githubusercontent.com/boa-dev/boa/main/assets/logo.svg" )] #![cfg_attr(not(test), forbid(clippy::unwrap_used))] -#![warn(missing_docs, clippy::dbg_macro)] -#![deny( +#![warn( // rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html warnings, future_incompatible, @@ -59,6 +58,7 @@ unused, // rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html + missing_docs, macro_use_extern_crate, meta_variable_misuse, missing_abi, @@ -87,6 +87,9 @@ rustdoc::invalid_rust_codeblocks, rustdoc::bare_urls, + // clippy allowed by default + clippy::dbg_macro, + // clippy categories https://doc.rust-lang.org/clippy/ clippy::all, clippy::correctness, @@ -96,7 +99,6 @@ clippy::perf, clippy::pedantic, clippy::nursery, - clippy::undocumented_unsafe_blocks )] #![allow( clippy::module_name_repetitions, diff --git a/boa_tester/src/main.rs b/boa_tester/src/main.rs index a6485d67dae..163a9c1aea0 100644 --- a/boa_tester/src/main.rs +++ b/boa_tester/src/main.rs @@ -9,8 +9,7 @@ html_favicon_url = "https://raw.githubusercontent.com/boa-dev/boa/main/assets/logo.svg" )] #![cfg_attr(not(test), deny(clippy::unwrap_used))] -#![warn(missing_docs, clippy::dbg_macro)] -#![deny( +#![warn( // rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html warnings, future_incompatible, @@ -22,6 +21,7 @@ unused, // rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html + missing_docs, macro_use_extern_crate, meta_variable_misuse, missing_abi, @@ -50,6 +50,9 @@ rustdoc::invalid_rust_codeblocks, rustdoc::bare_urls, + // clippy allowed by default + clippy::dbg_macro, + // clippy categories https://doc.rust-lang.org/clippy/ clippy::all, clippy::correctness, diff --git a/boa_wasm/src/lib.rs b/boa_wasm/src/lib.rs index 4869c13ed21..f1fc6eea525 100644 --- a/boa_wasm/src/lib.rs +++ b/boa_wasm/src/lib.rs @@ -6,8 +6,7 @@ html_favicon_url = "https://raw.githubusercontent.com/boa-dev/boa/main/assets/logo.svg" )] #![cfg_attr(not(test), forbid(clippy::unwrap_used))] -#![warn(missing_docs, clippy::dbg_macro)] -#![deny( +#![warn( // rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html warnings, future_incompatible, @@ -19,6 +18,7 @@ unused, // rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html + missing_docs, macro_use_extern_crate, meta_variable_misuse, missing_abi, @@ -47,6 +47,9 @@ rustdoc::invalid_rust_codeblocks, rustdoc::bare_urls, + // clippy allowed by default + clippy::dbg_macro, + // clippy categories https://doc.rust-lang.org/clippy/ clippy::all, clippy::correctness,