Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exclude = ["test_app"]

[package]
name = "cargo_pup"
version = "0.1.7"
version = "0.1.8"
edition = "2024"
description = "A Rust architectural linting tool that integrates with rustc to enforce architectural patterns and boundaries"
license = "Apache-2.0"
Expand All @@ -34,9 +34,9 @@ anyhow = { workspace = true }
tempfile = { workspace = true }
ron = { workspace = true }
cargo_metadata = { workspace = true }
cargo_pup_common = { path = "cargo_pup_common", version = "=0.1.7" }
cargo_pup_lint_impl = { path = "cargo_pup_lint_impl", version = "=0.1.7" }
cargo_pup_lint_config = { path = "cargo_pup_lint_config", version = "=0.1.7" }
cargo_pup_common = { path = "cargo_pup_common", version = "=0.1.8" }
cargo_pup_lint_impl = { path = "cargo_pup_lint_impl", version = "=0.1.8" }
cargo_pup_lint_config = { path = "cargo_pup_lint_config", version = "=0.1.8" }

#
# These bits are just to keep rust rover happy.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ First, add the following to your `Cargo.toml`:

```toml
[dev-dependencies]
cargo_pup_lint_config = "0.1.7"
cargo_pup_lint_config = "0.1.8"
```

## Examples
Expand Down
2 changes: 1 addition & 1 deletion cargo_pup_common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo_pup_common"
version = "0.1.7"
version = "0.1.8"
edition = "2024"
description = "Common utilities and shared components for cargo-pup architectural linting tool"
license = "Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions cargo_pup_lint_config/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo_pup_lint_config"
version = "0.1.7"
version = "0.1.8"
edition = "2024"
description = "Configuration and rule builder utilities for cargo-pup architectural linting"
license = "Apache-2.0"
Expand All @@ -13,4 +13,4 @@ serde.workspace = true
ron.workspace = true
tempfile.workspace = true
anyhow.workspace = true
cargo_pup_common = { path = "../cargo_pup_common", version = "=0.1.7" }
cargo_pup_common = { path = "../cargo_pup_common", version = "=0.1.8" }
2 changes: 1 addition & 1 deletion cargo_pup_lint_config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Add this to your `Cargo.toml`:

```toml
[dev-dependencies]
cargo_pup_lint_config = "0.1.7"
cargo_pup_lint_config = "0.1.8"
```

## Example
Expand Down
16 changes: 14 additions & 2 deletions cargo_pup_lint_config/src/lint_builder_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,23 @@ fn find_workspace_root() -> Result<std::path::PathBuf> {
if dir.join("src").join("pup_driver.rs").exists() {
return Ok(dir.to_path_buf());
}

let cargo_toml = dir.join("Cargo.toml");
if cargo_toml.exists()
&& let Ok(contents) = std::fs::read_to_string(&cargo_toml)
&& contents.contains("name = \"cargo_pup\"")
{
return Ok(dir.to_path_buf());
}

check_dir = dir.parent();
}

// If we can't find workspace root, return current directory
Ok(current_dir)
// Neither walking up from the test binary nor from the current working
// directory found a real cargo-pup workspace. Bail so the caller falls
// back to the system-installed `cargo pup` instead of accidentally
// treating the user's own project directory as the cargo-pup workspace.
anyhow::bail!("Failed to find cargo-pup workspace root")
}

fn run_command(lint_builder: &LintBuilder, command: &str, args: &[&str]) -> Result<Output> {
Expand Down
6 changes: 3 additions & 3 deletions cargo_pup_lint_impl/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo_pup_lint_impl"
version = "0.1.7"
version = "0.1.8"
edition = "2024"
description = "Core lint implementations and rustc integration for cargo-pup architectural linting"
license = "Apache-2.0"
Expand All @@ -9,8 +9,8 @@ homepage = "https://github.com/datadog/cargo-pup"
readme = "README.md"

[dependencies]
cargo_pup_lint_config = { path = "../cargo_pup_lint_config", version = "=0.1.7" }
cargo_pup_common = { path = "../cargo_pup_common", version = "=0.1.7" }
cargo_pup_lint_config = { path = "../cargo_pup_lint_config", version = "=0.1.8" }
cargo_pup_common = { path = "../cargo_pup_common", version = "=0.1.8" }
anyhow.workspace = true
regex.workspace = true
serde_json.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions test_app/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading