Skip to content

Commit

Permalink
chore: migrate lints to root manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes committed Dec 24, 2023
1 parent 7193f48 commit 551b264
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 10 deletions.
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ categories = ["compilers", "cryptography", "cryptography::cryptocurrencies"]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[workspace.lints.rust]
unreachable_pub = "warn"
unused_must_use = "deny"
rust_2018_idioms = "deny"

[workspace.lints.rustdoc]
all = "warn"

[workspace.dependencies]
sulk-ast = { version = "0.0.0", path = "crates/ast" }
sulk-data-structures = { version = "0.0.0", path = "crates/data-structures" }
Expand Down
7 changes: 7 additions & 0 deletions crates/ast/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ repository.workspace = true
keywords.workspace = true
categories.workspace = true

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[lints]
workspace = true

[dependencies]
sulk-data-structures.workspace = true
sulk-macros.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions crates/ast/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
html_logo_url = "https://raw.githubusercontent.com/danipopes/sulk/main/assets/logo.jpg",
html_favicon_url = "https://raw.githubusercontent.com/danipopes/sulk/main/assets/favicon.ico"
)]
#![warn(unreachable_pub, rustdoc::all)]
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
#![deny(unused_must_use, rust_2018_idioms)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]

// TODO
Expand Down
7 changes: 7 additions & 0 deletions crates/data-structures/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ repository.workspace = true
keywords.workspace = true
categories.workspace = true

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[lints]
workspace = true

[dependencies]
ahash.workspace = true
smallvec = { workspace = true, features = ["union"] }
Expand Down
2 changes: 0 additions & 2 deletions crates/data-structures/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
html_logo_url = "https://raw.githubusercontent.com/danipopes/sulk/main/assets/logo.jpg",
html_favicon_url = "https://raw.githubusercontent.com/danipopes/sulk/main/assets/favicon.ico"
)]
#![warn(unreachable_pub, rustdoc::all)]
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
#![deny(unused_must_use, rust_2018_idioms)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![cfg_attr(feature = "nightly", feature(cell_leak))]
#![cfg_attr(feature = "nightly", feature(core_intrinsics))]
Expand Down
7 changes: 7 additions & 0 deletions crates/interface/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ repository.workspace = true
keywords.workspace = true
categories.workspace = true

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[lints]
workspace = true

[dependencies]
sulk-data-structures.workspace = true
sulk-macros.workspace = true
Expand Down
2 changes: 0 additions & 2 deletions crates/interface/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
html_logo_url = "https://raw.githubusercontent.com/danipopes/sulk/main/assets/logo.jpg",
html_favicon_url = "https://raw.githubusercontent.com/danipopes/sulk/main/assets/favicon.ico"
)]
#![warn(unreachable_pub, rustdoc::all)]
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
#![deny(unused_must_use, rust_2018_idioms)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]

pub mod diagnostics;
Expand Down
7 changes: 7 additions & 0 deletions crates/macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ repository.workspace = true
keywords.workspace = true
categories.workspace = true

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[lints]
workspace = true

[lib]
proc-macro = true

Expand Down
3 changes: 1 addition & 2 deletions crates/macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
html_logo_url = "https://raw.githubusercontent.com/danipopes/sulk/main/assets/logo.jpg",
html_favicon_url = "https://raw.githubusercontent.com/danipopes/sulk/main/assets/favicon.ico"
)]
#![warn(rustdoc::all)]
#![allow(unreachable_pub)]
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
#![deny(unused_must_use, rust_2018_idioms)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]

use proc_macro::TokenStream;
Expand Down
8 changes: 8 additions & 0 deletions crates/parser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,19 @@ repository.workspace = true
keywords.workspace = true
categories.workspace = true

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[lints]
workspace = true

[dependencies]
sulk-ast.workspace = true
sulk-interface.workspace = true

hex.workspace = true
# TODO
# unicode-ident.workspace = true
# unicode-normalization.workspace = true

Expand Down
2 changes: 0 additions & 2 deletions crates/parser/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
html_logo_url = "https://raw.githubusercontent.com/danipopes/sulk/main/assets/logo.jpg",
html_favicon_url = "https://raw.githubusercontent.com/danipopes/sulk/main/assets/favicon.ico"
)]
#![warn(unreachable_pub, rustdoc::all)]
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
#![deny(unused_must_use, rust_2018_idioms)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]

pub mod lexer;
Expand Down

0 comments on commit 551b264

Please sign in to comment.