diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 4ee2dc6460..c027e4a83e 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 96a5e61112..2fd4349e5d 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 diff --git a/boa_ast/src/lib.rs b/boa_ast/src/lib.rs index 039e3eb03e..2a8430d4b9 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 da705e54b1..910b42841d 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 9a7eb0c60a..aa92da72bd 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 d17dd86d3a..0c7b974c53 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 5146564c47..7dad41ee85 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 b220ec8658..fc2c24bbe1 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 56a9edbf6a..798a6d6415 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 99dc0f3fc8..deb6289660 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 d5d832f4e6..2a9639502d 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 bec760191a..aa37a19bd0 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 ef84a240ca..fb0c4b10ab 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 4869c13ed2..f1fc6eea52 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,