Skip to content

Commit

Permalink
Enforce project wide lints and add add missing comments and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jix committed Sep 8, 2024
1 parent 8ac1fa9 commit 6920c04
Show file tree
Hide file tree
Showing 23 changed files with 193 additions and 17 deletions.
7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ members = [
# comment to force multi-line layout
]

[workspace.lints.rust]
unsafe_op_in_unsafe_fn = "warn"
missing_docs = "warn"

[workspace.lints.clippy]
undocumented_unsafe_blocks = "warn"

[profile.release]
debug = true

Expand Down
3 changes: 3 additions & 0 deletions abc-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name = "imctk-abc-sys"
version = "0.1.0"
edition = "2021"

# We're not using the workspace lints as this crate contains only
# auto-generated bindings for which most lints need to be disabled

[dependencies]
libc = "0.2.155"

Expand Down
1 change: 1 addition & 0 deletions abc-sys/build.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(missing_docs)] // build script
use std::path::PathBuf;

static SRC_FILES: &[&str] = &[
Expand Down
3 changes: 3 additions & 0 deletions abc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name = "imctk-abc"
version = "0.1.0"
edition = "2021"

[lints]
workspace = true

[dependencies]
imctk-abc-sys = { version = "0.1.0", path = "../abc-sys" }
imctk-ids = { version = "0.1.0", path = "../ids" }
Expand Down
2 changes: 2 additions & 0 deletions abc/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
//! Safe Rust bindings to a small subset of ABC's API
pub mod sat;
2 changes: 2 additions & 0 deletions abc/src/sat.rs
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
//! Bindings to abc's SAT solvers
pub mod glucose2;
Loading

0 comments on commit 6920c04

Please sign in to comment.