Browse Source

Replace #[deny] with #[warn] (#3309)

* Change deny lints to warn lints

* Deny warnings on CI
pull/3041/merge
José Julián Espina 1 year ago committed by GitHub
parent
commit
0bb51b189e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .github/workflows/rust.yml
  2. 1
      .github/workflows/webassembly.yml
  3. 7
      boa_ast/src/lib.rs
  4. 7
      boa_cli/src/main.rs
  5. 7
      boa_engine/src/lib.rs
  6. 9
      boa_gc/src/lib.rs
  7. 7
      boa_icu_provider/src/lib.rs
  8. 8
      boa_interner/src/lib.rs
  9. 7
      boa_macros/src/lib.rs
  10. 7
      boa_parser/src/lib.rs
  11. 7
      boa_profiler/src/lib.rs
  12. 8
      boa_runtime/src/lib.rs
  13. 7
      boa_tester/src/main.rs
  14. 7
      boa_wasm/src/lib.rs

2
.github/workflows/rust.yml

@ -88,6 +88,8 @@ jobs:
name: Misc name: Misc
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 60 timeout-minutes: 60
env:
RUSTFLAGS: -D warnings
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1.0.7 - uses: actions-rs/toolchain@v1.0.7

1
.github/workflows/webassembly.yml

@ -27,6 +27,7 @@ jobs:
timeout-minutes: 60 timeout-minutes: 60
env: env:
WASM_PACK_PATH: ~/.cargo/bin/wasm-pack WASM_PACK_PATH: ~/.cargo/bin/wasm-pack
RUSTFLAGS: -D warnings
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1.0.7 - uses: actions-rs/toolchain@v1.0.7

7
boa_ast/src/lib.rs

@ -18,8 +18,7 @@
html_favicon_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"
)] )]
#![cfg_attr(not(test), forbid(clippy::unwrap_used))] #![cfg_attr(not(test), forbid(clippy::unwrap_used))]
#![warn(missing_docs, clippy::dbg_macro)] #![warn(
#![deny(
// rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html // rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html
warnings, warnings,
future_incompatible, future_incompatible,
@ -31,6 +30,7 @@
unused, unused,
// rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html // rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html
missing_docs,
macro_use_extern_crate, macro_use_extern_crate,
meta_variable_misuse, meta_variable_misuse,
missing_abi, missing_abi,
@ -59,6 +59,9 @@
rustdoc::invalid_rust_codeblocks, rustdoc::invalid_rust_codeblocks,
rustdoc::bare_urls, rustdoc::bare_urls,
// clippy allowed by default
clippy::dbg_macro,
// clippy categories https://doc.rust-lang.org/clippy/ // clippy categories https://doc.rust-lang.org/clippy/
clippy::all, clippy::all,
clippy::correctness, clippy::correctness,

7
boa_cli/src/main.rs

@ -6,8 +6,7 @@
html_favicon_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"
)] )]
#![cfg_attr(not(test), deny(clippy::unwrap_used))] #![cfg_attr(not(test), deny(clippy::unwrap_used))]
#![warn(missing_docs, clippy::dbg_macro)] #![warn(
#![deny(
// rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html // rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html
warnings, warnings,
future_incompatible, future_incompatible,
@ -19,6 +18,7 @@
unused, unused,
// rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html // rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html
missing_docs,
macro_use_extern_crate, macro_use_extern_crate,
meta_variable_misuse, meta_variable_misuse,
missing_abi, missing_abi,
@ -47,6 +47,9 @@
rustdoc::invalid_rust_codeblocks, rustdoc::invalid_rust_codeblocks,
rustdoc::bare_urls, rustdoc::bare_urls,
// clippy allowed by default
clippy::dbg_macro,
// clippy categories https://doc.rust-lang.org/clippy/ // clippy categories https://doc.rust-lang.org/clippy/
clippy::all, clippy::all,
clippy::correctness, clippy::correctness,

7
boa_engine/src/lib.rs

@ -52,8 +52,7 @@
html_favicon_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"
)] )]
#![cfg_attr(not(test), forbid(clippy::unwrap_used))] #![cfg_attr(not(test), forbid(clippy::unwrap_used))]
#![warn(missing_docs, clippy::dbg_macro)] #![warn(
#![deny(
// rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html // rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html
warnings, warnings,
future_incompatible, future_incompatible,
@ -65,6 +64,7 @@
unused, unused,
// rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html // rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html
missing_docs,
macro_use_extern_crate, macro_use_extern_crate,
meta_variable_misuse, meta_variable_misuse,
missing_abi, missing_abi,
@ -93,6 +93,9 @@
rustdoc::invalid_rust_codeblocks, rustdoc::invalid_rust_codeblocks,
rustdoc::bare_urls, rustdoc::bare_urls,
// clippy allowed by default
clippy::dbg_macro,
// clippy categories https://doc.rust-lang.org/clippy/ // clippy categories https://doc.rust-lang.org/clippy/
clippy::all, clippy::all,
clippy::correctness, clippy::correctness,

9
boa_gc/src/lib.rs

@ -10,8 +10,7 @@
html_favicon_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"
)] )]
#![cfg_attr(not(test), forbid(clippy::unwrap_used))] #![cfg_attr(not(test), forbid(clippy::unwrap_used))]
#![warn(missing_docs, clippy::dbg_macro)] #![warn(
#![deny(
// rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html // rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html
warnings, warnings,
future_incompatible, future_incompatible,
@ -23,6 +22,7 @@
unused, unused,
// rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html // rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html
missing_docs,
macro_use_extern_crate, macro_use_extern_crate,
meta_variable_misuse, meta_variable_misuse,
missing_abi, missing_abi,
@ -51,6 +51,10 @@
rustdoc::invalid_rust_codeblocks, rustdoc::invalid_rust_codeblocks,
rustdoc::bare_urls, rustdoc::bare_urls,
// clippy allowed by default
clippy::dbg_macro,
clippy::undocumented_unsafe_blocks,
// clippy categories https://doc.rust-lang.org/clippy/ // clippy categories https://doc.rust-lang.org/clippy/
clippy::all, clippy::all,
clippy::correctness, clippy::correctness,
@ -60,7 +64,6 @@
clippy::perf, clippy::perf,
clippy::pedantic, clippy::pedantic,
clippy::nursery, clippy::nursery,
clippy::undocumented_unsafe_blocks
)] )]
#![allow( #![allow(
clippy::module_name_repetitions, clippy::module_name_repetitions,

7
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_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" 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 // rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html
warnings, warnings,
future_incompatible, future_incompatible,
@ -31,6 +31,7 @@
unused, unused,
// rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html // rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html
missing_docs,
macro_use_extern_crate, macro_use_extern_crate,
meta_variable_misuse, meta_variable_misuse,
missing_abi, missing_abi,
@ -41,6 +42,7 @@
single_use_lifetimes, single_use_lifetimes,
trivial_casts, trivial_casts,
trivial_numeric_casts, trivial_numeric_casts,
unreachable_pub,
unsafe_op_in_unsafe_fn, unsafe_op_in_unsafe_fn,
unused_import_braces, unused_import_braces,
unused_lifetimes, unused_lifetimes,
@ -57,6 +59,9 @@
rustdoc::invalid_rust_codeblocks, rustdoc::invalid_rust_codeblocks,
rustdoc::bare_urls, rustdoc::bare_urls,
// clippy allowed by default
clippy::dbg_macro,
// clippy categories https://doc.rust-lang.org/clippy/ // clippy categories https://doc.rust-lang.org/clippy/
clippy::all, clippy::all,
clippy::correctness, clippy::correctness,

8
boa_interner/src/lib.rs

@ -16,8 +16,7 @@
html_favicon_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"
)] )]
#![cfg_attr(not(test), forbid(clippy::unwrap_used))] #![cfg_attr(not(test), forbid(clippy::unwrap_used))]
#![warn(missing_docs, clippy::dbg_macro)] #![warn(
#![deny(
// rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html // rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html
warnings, warnings,
future_incompatible, future_incompatible,
@ -29,6 +28,7 @@
unused, unused,
// rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html // rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html
missing_docs,
macro_use_extern_crate, macro_use_extern_crate,
meta_variable_misuse, meta_variable_misuse,
missing_abi, missing_abi,
@ -36,6 +36,7 @@
missing_debug_implementations, missing_debug_implementations,
non_ascii_idents, non_ascii_idents,
noop_method_call, noop_method_call,
single_use_lifetimes,
trivial_casts, trivial_casts,
trivial_numeric_casts, trivial_numeric_casts,
unreachable_pub, unreachable_pub,
@ -56,6 +57,9 @@
rustdoc::invalid_rust_codeblocks, rustdoc::invalid_rust_codeblocks,
rustdoc::bare_urls, rustdoc::bare_urls,
// clippy allowed by default
clippy::dbg_macro,
// clippy categories https://doc.rust-lang.org/clippy/ // clippy categories https://doc.rust-lang.org/clippy/
clippy::all, clippy::all,
clippy::correctness, clippy::correctness,

7
boa_macros/src/lib.rs

@ -6,8 +6,7 @@
html_favicon_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"
)] )]
#![cfg_attr(not(test), forbid(clippy::unwrap_used))] #![cfg_attr(not(test), forbid(clippy::unwrap_used))]
#![warn(missing_docs, clippy::dbg_macro)] #![warn(
#![deny(
// rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html // rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html
warnings, warnings,
future_incompatible, future_incompatible,
@ -19,6 +18,7 @@
unused, unused,
// rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html // rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html
missing_docs,
macro_use_extern_crate, macro_use_extern_crate,
meta_variable_misuse, meta_variable_misuse,
missing_abi, missing_abi,
@ -47,6 +47,9 @@
rustdoc::invalid_rust_codeblocks, rustdoc::invalid_rust_codeblocks,
rustdoc::bare_urls, rustdoc::bare_urls,
// clippy allowed by default
clippy::dbg_macro,
// clippy categories https://doc.rust-lang.org/clippy/ // clippy categories https://doc.rust-lang.org/clippy/
clippy::all, clippy::all,
clippy::correctness, clippy::correctness,

7
boa_parser/src/lib.rs

@ -16,8 +16,7 @@
html_favicon_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"
)] )]
#![cfg_attr(not(test), forbid(clippy::unwrap_used))] #![cfg_attr(not(test), forbid(clippy::unwrap_used))]
#![warn(missing_docs, clippy::dbg_macro)] #![warn(
#![deny(
// rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html // rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html
warnings, warnings,
future_incompatible, future_incompatible,
@ -29,6 +28,7 @@
unused, unused,
// rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html // rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html
missing_docs,
macro_use_extern_crate, macro_use_extern_crate,
meta_variable_misuse, meta_variable_misuse,
missing_abi, missing_abi,
@ -57,6 +57,9 @@
rustdoc::invalid_rust_codeblocks, rustdoc::invalid_rust_codeblocks,
rustdoc::bare_urls, rustdoc::bare_urls,
// clippy allowed by default
clippy::dbg_macro,
// clippy categories https://doc.rust-lang.org/clippy/ // clippy categories https://doc.rust-lang.org/clippy/
clippy::all, clippy::all,
clippy::correctness, clippy::correctness,

7
boa_profiler/src/lib.rs

@ -13,8 +13,7 @@
html_favicon_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"
)] )]
#![cfg_attr(not(test), forbid(clippy::unwrap_used))] #![cfg_attr(not(test), forbid(clippy::unwrap_used))]
#![warn(missing_docs, clippy::dbg_macro)] #![warn(
#![deny(
// rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html // rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html
warnings, warnings,
future_incompatible, future_incompatible,
@ -26,6 +25,7 @@
unused, unused,
// rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html // rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html
missing_docs,
macro_use_extern_crate, macro_use_extern_crate,
meta_variable_misuse, meta_variable_misuse,
missing_abi, missing_abi,
@ -54,6 +54,9 @@
rustdoc::invalid_rust_codeblocks, rustdoc::invalid_rust_codeblocks,
rustdoc::bare_urls, rustdoc::bare_urls,
// clippy allowed by default
clippy::dbg_macro,
// clippy categories https://doc.rust-lang.org/clippy/ // clippy categories https://doc.rust-lang.org/clippy/
clippy::all, clippy::all,
clippy::correctness, clippy::correctness,

8
boa_runtime/src/lib.rs

@ -46,8 +46,7 @@
html_favicon_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"
)] )]
#![cfg_attr(not(test), forbid(clippy::unwrap_used))] #![cfg_attr(not(test), forbid(clippy::unwrap_used))]
#![warn(missing_docs, clippy::dbg_macro)] #![warn(
#![deny(
// rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html // rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html
warnings, warnings,
future_incompatible, future_incompatible,
@ -59,6 +58,7 @@
unused, unused,
// rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html // rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html
missing_docs,
macro_use_extern_crate, macro_use_extern_crate,
meta_variable_misuse, meta_variable_misuse,
missing_abi, missing_abi,
@ -87,6 +87,9 @@
rustdoc::invalid_rust_codeblocks, rustdoc::invalid_rust_codeblocks,
rustdoc::bare_urls, rustdoc::bare_urls,
// clippy allowed by default
clippy::dbg_macro,
// clippy categories https://doc.rust-lang.org/clippy/ // clippy categories https://doc.rust-lang.org/clippy/
clippy::all, clippy::all,
clippy::correctness, clippy::correctness,
@ -96,7 +99,6 @@
clippy::perf, clippy::perf,
clippy::pedantic, clippy::pedantic,
clippy::nursery, clippy::nursery,
clippy::undocumented_unsafe_blocks
)] )]
#![allow( #![allow(
clippy::module_name_repetitions, clippy::module_name_repetitions,

7
boa_tester/src/main.rs

@ -9,8 +9,7 @@
html_favicon_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"
)] )]
#![cfg_attr(not(test), deny(clippy::unwrap_used))] #![cfg_attr(not(test), deny(clippy::unwrap_used))]
#![warn(missing_docs, clippy::dbg_macro)] #![warn(
#![deny(
// rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html // rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html
warnings, warnings,
future_incompatible, future_incompatible,
@ -22,6 +21,7 @@
unused, unused,
// rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html // rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html
missing_docs,
macro_use_extern_crate, macro_use_extern_crate,
meta_variable_misuse, meta_variable_misuse,
missing_abi, missing_abi,
@ -50,6 +50,9 @@
rustdoc::invalid_rust_codeblocks, rustdoc::invalid_rust_codeblocks,
rustdoc::bare_urls, rustdoc::bare_urls,
// clippy allowed by default
clippy::dbg_macro,
// clippy categories https://doc.rust-lang.org/clippy/ // clippy categories https://doc.rust-lang.org/clippy/
clippy::all, clippy::all,
clippy::correctness, clippy::correctness,

7
boa_wasm/src/lib.rs

@ -6,8 +6,7 @@
html_favicon_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"
)] )]
#![cfg_attr(not(test), forbid(clippy::unwrap_used))] #![cfg_attr(not(test), forbid(clippy::unwrap_used))]
#![warn(missing_docs, clippy::dbg_macro)] #![warn(
#![deny(
// rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html // rustc lint groups https://doc.rust-lang.org/rustc/lints/groups.html
warnings, warnings,
future_incompatible, future_incompatible,
@ -19,6 +18,7 @@
unused, unused,
// rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html // rustc allowed-by-default lints https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html
missing_docs,
macro_use_extern_crate, macro_use_extern_crate,
meta_variable_misuse, meta_variable_misuse,
missing_abi, missing_abi,
@ -47,6 +47,9 @@
rustdoc::invalid_rust_codeblocks, rustdoc::invalid_rust_codeblocks,
rustdoc::bare_urls, rustdoc::bare_urls,
// clippy allowed by default
clippy::dbg_macro,
// clippy categories https://doc.rust-lang.org/clippy/ // clippy categories https://doc.rust-lang.org/clippy/
clippy::all, clippy::all,
clippy::correctness, clippy::correctness,

Loading…
Cancel
Save