Skip to content
8 changes: 4 additions & 4 deletions .repository-projection.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"projection": "capobara",
"projectionSchemaVersion": 1,
"sourceRepository": "dx-corp/mono",
"sourceSha": "9a003786d7679e9029fa077557bc7ab4d00eb48f",
"sourceSha": "511bd2305f5a92cfbedb91208d7bc0820fda29b5",
"destinationRepository": "dx-corp/capobara",
"priorProjectedBase": "21c9a0d4eb3d6d01bb19b44b6ad019026271ad43",
"priorProjectedBase": "01e475cef45ab0d58e52c9c54ece7ff6cff35d03",
"definitionDigest": "7826c75cbd356dad6c867f2606ebde8b79ef4361353908cf33ada720034ec488",
"toolDigest": "8a4412f3a379ca0bd1cfea9bff69cc46773c6d1f",
"contentDigest": "1777077598eefc1c640e427b21a039aae8e35277fcee017ed834e3b7690d9da8",
"toolDigest": "e9fc82741fdf4a797b076d29d51e14aced32368b",
"contentDigest": "6966b9fe44e8b9c45addee6ee807e2fd03993de04f3763fe6b7f3d319db00f8b",
"publicationEligible": true
}
8 changes: 4 additions & 4 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
//! CAPOBARA_TREE_ID".
use std::process::Command;

#[allow(
clippy::disallowed_methods,
reason = "build script queries git for the crate tree id"
)]
fn git(dir: &str, args: &[&str]) -> Option<String> {
#[allow(
clippy::disallowed_methods,
reason = "build script queries git for the crate tree id"
)]
let output = Command::new("git")
.arg("-C")
.arg(dir)
Expand Down
8 changes: 4 additions & 4 deletions src/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ use crate::{Error, Result};

/// The reviewed process boundary for git: every other module reaches git
/// only through this function (or the helpers below that call it).
#[allow(
clippy::disallowed_methods,
reason = "git is the reviewed process boundary for capobara"
)]
fn run(root: &Path, args: &[&str]) -> Result<std::process::Output> {
#[allow(
clippy::disallowed_methods,
reason = "git is the reviewed process boundary for capobara"
)]
Command::new("git")
.arg("-C")
.arg(root)
Expand Down
8 changes: 4 additions & 4 deletions src/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ pub fn with_snapshot<T>(
/// closed its stdin, producing a broken pipe on our write). A write error
/// is remembered rather than propagated immediately, so the child is
/// always reaped and a broken pipe never shadows `tar`'s real diagnostic.
#[allow(
clippy::disallowed_methods,
reason = "tar extraction of a git archive is a reviewed process boundary"
)]
fn extract_tar(archive: &[u8], dest: &Path) -> Result<()> {
#[allow(
clippy::disallowed_methods,
reason = "tar extraction of a git archive is a reviewed process boundary"
)]
let mut tar = Command::new("tar")
.args(["-xf", "-", "-C"])
.arg(dest)
Expand Down
8 changes: 4 additions & 4 deletions tests/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,11 @@ fn coupled_projections_share_one_source_revision_and_require_every_member_presen
assert_eq!(err.to_string(), "Missing coupled projection: deixic-node");
}

#[allow(
clippy::disallowed_methods,
reason = "integration test executes the capobara binary"
)]
fn capobara() -> std::process::Command {
#[allow(
clippy::disallowed_methods,
reason = "integration test executes the capobara binary"
)]
std::process::Command::new(env!("CARGO_BIN_EXE_capobara"))
}

Expand Down
8 changes: 4 additions & 4 deletions tests/project_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ mod support;
use std::process::Command;
use support::Repo;

#[allow(
clippy::disallowed_methods,
reason = "integration test executes the capobara binary"
)]
fn capobara() -> Command {
#[allow(
clippy::disallowed_methods,
reason = "integration test executes the capobara binary"
)]
Command::new(env!("CARGO_BIN_EXE_capobara"))
}

Expand Down
24 changes: 12 additions & 12 deletions tests/run_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,19 +120,19 @@ fn write_recording(dir: &Path, calls: Vec<Value>) -> PathBuf {
path
}

#[allow(
clippy::disallowed_methods,
reason = "integration test executes the capobara binary"
)]
fn capobara() -> Command {
#[allow(
clippy::disallowed_methods,
reason = "integration test executes the capobara binary"
)]
Command::new(env!("CARGO_BIN_EXE_capobara"))
}

#[allow(
clippy::disallowed_methods,
reason = "integration tests drive scratch git repositories outside the support::Repo helper"
)]
fn run_git(path: &Path, args: &[&str]) -> String {
#[allow(
clippy::disallowed_methods,
reason = "integration tests drive scratch git repositories outside the support::Repo helper"
)]
let out = Command::new("git")
.arg("-C")
.arg(path)
Expand All @@ -147,11 +147,11 @@ fn run_git(path: &Path, args: &[&str]) -> String {
String::from_utf8(out.stdout).unwrap()
}

#[allow(
clippy::disallowed_methods,
reason = "integration test inspects a scratch bare git repository's refs"
)]
fn ref_sha(path: &Path, refname: &str) -> Option<String> {
#[allow(
clippy::disallowed_methods,
reason = "integration test inspects a scratch bare git repository's refs"
)]
Command::new("git")
.arg("-C")
.arg(path)
Expand Down
8 changes: 4 additions & 4 deletions tests/sdk_assembly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,11 +426,11 @@ fn deixic_python_definition_loads_against_the_real_sdk_assembly_policy() {
// in the `sdk-assembly-v1` branch of `build_projection`.
// ---------------------------------------------------------------------

#[allow(
clippy::disallowed_methods,
reason = "integration test executes the capobara binary"
)]
fn capobara() -> Command {
#[allow(
clippy::disallowed_methods,
reason = "integration test executes the capobara binary"
)]
Command::new(env!("CARGO_BIN_EXE_capobara"))
}

Expand Down
16 changes: 8 additions & 8 deletions tests/support/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ impl Repo {
pub fn path(&self) -> &Path {
self.dir.path()
}
#[allow(
clippy::disallowed_methods,
reason = "integration tests drive a scratch git repository"
)]
pub fn git(&self, args: &[&str]) -> String {
#[allow(
clippy::disallowed_methods,
reason = "integration tests drive a scratch git repository"
)]
let out = Command::new("git")
.arg("-C")
.arg(self.path())
Expand Down Expand Up @@ -191,11 +191,11 @@ pub fn is_named_by_include(mapping: &capobara::definition::Mapping, path: &str)
}

/// `git ls-files` under `dir`, relative to `dir`.
#[allow(
clippy::disallowed_methods,
reason = "test enumerates the crate's own git-tracked files"
)]
pub fn git_ls_files(dir: &Path) -> Vec<String> {
#[allow(
clippy::disallowed_methods,
reason = "test enumerates the crate's own git-tracked files"
)]
let out = Command::new("git")
.arg("-C")
.arg(dir)
Expand Down
48 changes: 24 additions & 24 deletions tests/transport_git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ fn write_report(path: &Path, report: &Report) {
std::fs::write(path, serde_json::to_string(report).unwrap()).unwrap();
}

#[allow(
clippy::disallowed_methods,
reason = "integration test executes the capobara binary"
)]
fn capobara() -> Command {
#[allow(
clippy::disallowed_methods,
reason = "integration test executes the capobara binary"
)]
Command::new(env!("CARGO_BIN_EXE_capobara"))
}

Expand Down Expand Up @@ -184,11 +184,11 @@ fn run_capobara(
);
}

#[allow(
clippy::disallowed_methods,
reason = "integration tests drive scratch git repositories outside the support::Repo helper"
)]
fn run_git(path: &Path, args: &[&str]) -> String {
#[allow(
clippy::disallowed_methods,
reason = "integration tests drive scratch git repositories outside the support::Repo helper"
)]
let out = Command::new("git")
.arg("-C")
.arg(path)
Expand All @@ -203,11 +203,11 @@ fn run_git(path: &Path, args: &[&str]) -> String {
String::from_utf8(out.stdout).unwrap()
}

#[allow(
clippy::disallowed_methods,
reason = "integration test drives a scratch git repository outside the support::Repo helper"
)]
fn clone_no_local(src: &Path, dest: &Path) {
#[allow(
clippy::disallowed_methods,
reason = "integration test drives a scratch git repository outside the support::Repo helper"
)]
let out = Command::new("git")
.args(["clone", "--quiet", "--no-local"])
.arg(src)
Expand All @@ -221,11 +221,11 @@ fn clone_no_local(src: &Path, dest: &Path) {
);
}

#[allow(
clippy::disallowed_methods,
reason = "integration test probes object reachability in a scratch git repository"
)]
fn commit_exists(path: &Path, sha: &str) -> bool {
#[allow(
clippy::disallowed_methods,
reason = "integration test probes object reachability in a scratch git repository"
)]
Command::new("git")
.arg("-C")
.arg(path)
Expand All @@ -235,11 +235,11 @@ fn commit_exists(path: &Path, sha: &str) -> bool {
.unwrap_or(false)
}

#[allow(
clippy::disallowed_methods,
reason = "integration test inspects a scratch bare git repository's refs"
)]
fn ref_exists(path: &Path, refname: &str) -> bool {
#[allow(
clippy::disallowed_methods,
reason = "integration test inspects a scratch bare git repository's refs"
)]
Command::new("git")
.arg("-C")
.arg(path)
Expand Down Expand Up @@ -778,11 +778,11 @@ fn ls_remote_sha(from: &Path, remote: &Path, refname: &str) -> Option<String> {
out.split_whitespace().next().map(str::to_owned)
}

#[allow(
clippy::disallowed_methods,
reason = "integration test re-executes its own test binary with GH_TOKEN set"
)]
fn self_exe() -> Command {
#[allow(
clippy::disallowed_methods,
reason = "integration test re-executes its own test binary with GH_TOKEN set"
)]
Command::new(std::env::current_exe().unwrap())
}

Expand Down