From a4de8f9f3da5961ac17448a1029ea991fe4ee13e Mon Sep 17 00:00:00 2001 From: jedel1043 Date: Mon, 25 Sep 2023 15:29:28 -0600 Subject: [PATCH 1/2] Change deny lints to warn lints --- 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 +++++-- 12 files changed, 63 insertions(+), 25 deletions(-) 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 9a7eb0c60ae..aa92da72bd5 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 d17dd86d3aa..0c7b974c53d 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 5146564c473..7dad41ee854 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 b220ec8658c..fc2c24bbe19 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 56a9edbf6ab..798a6d64154 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 d5d832f4e60..2a9639502dc 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 bec760191a0..aa37a19bd08 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 ef84a240cab..fb0c4b10ab5 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, From 51487ada0e0d0e5c7667a2451b5fb012554037db Mon Sep 17 00:00:00 2001 From: jedel1043 Date: Mon, 25 Sep 2023 16:54:53 -0600 Subject: [PATCH 2/2] Deny warnings on CI --- .github/workflows/rust.yml | 2 ++ .github/workflows/webassembly.yml | 1 + 2 files changed, 3 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 4ee2dc64606..c027e4a83e1 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -88,6 +88,8 @@ jobs: name: Misc runs-on: ubuntu-latest timeout-minutes: 60 + env: + RUSTFLAGS: -D warnings steps: - uses: actions/checkout@v4 - uses: actions-rs/toolchain@v1.0.7 diff --git a/.github/workflows/webassembly.yml b/.github/workflows/webassembly.yml index 96a5e61112e..2fd4349e5d5 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@v4 - uses: actions-rs/toolchain@v1.0.7