Skip to content

Commit

Permalink
Merge pull request #153 from lquerel/policy-engine-ext
Browse files Browse the repository at this point in the history
Detect and Process Policy Files into SemConv Registry + Generic Diagnostic Reporting
  • Loading branch information
lquerel authored May 20, 2024
2 parents b1e8588 + 1bb4931 commit 9c4c88f
Show file tree
Hide file tree
Showing 79 changed files with 1,696 additions and 3,985 deletions.
121 changes: 101 additions & 20 deletions Cargo.lock

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

6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ ordered-float = { version = "4.2.0", features = ["serde"] }
walkdir = "2.5.0"
anyhow = "1.0.83"
itertools = "0.12.1"
globset = { version = "0.4.14", features = ["serde1"] }
miette = { version = "7.2.0", features = ["fancy", "serde"] }

# Features definition =========================================================
[features]
Expand Down Expand Up @@ -67,8 +69,12 @@ serde.workspace = true
serde_yaml.workspace = true
serde_json.workspace = true
walkdir.workspace = true

rayon = "1.10.0"

[dev-dependencies]
assert_cmd = "2.0.14"

[profile.release]
lto = true
strip = true
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ COPY crates /build/crates
COPY data /build/data
COPY src /build/src
COPY tests build/tests
COPY diagnostic_templates /build/diagnostic_templates
# Don't build release, so we get template debugging output.
RUN cargo build

Expand Down
1 change: 1 addition & 0 deletions crates/weaver_cache/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ gix = { version = "0.62.0", default-features = false, features = [
] }

thiserror.workspace = true
serde.workspace = true

1 change: 1 addition & 0 deletions crates/weaver_cache/allowed-external-types.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
# This is used with cargo-check-external-types to reduce the surface area of downstream crates from
# the public API. Ideally this can have a few exceptions as possible.
allowed_external_types = [
"serde::ser::Serialize",
]
3 changes: 2 additions & 1 deletion crates/weaver_cache/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ use gix::clone::PrepareFetch;
use gix::create::Kind;
use gix::remote::fetch::Shallow;
use gix::{create, open, progress};
use serde::Serialize;
use tempdir::TempDir;

/// An error that can occur while creating or using a cache.
#[derive(thiserror::Error, Debug)]
#[derive(thiserror::Error, Debug, Serialize)]
#[non_exhaustive]
pub enum Error {
/// Home directory not found.
Expand Down
3 changes: 3 additions & 0 deletions crates/weaver_checker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ thiserror.workspace = true
serde.workspace = true
serde_json.workspace = true
serde_yaml.workspace = true
walkdir.workspace = true
globset.workspace = true
miette.workspace = true

regorus = { version = "0.1.5", default-features = false, features = [
"arc",
Expand Down
Loading

0 comments on commit 9c4c88f

Please sign in to comment.