Skip to content

Commit

Permalink
ci: run clippy on all workspaces (#1780)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hofer-Julian authored Aug 12, 2024
1 parent 55741ae commit 345e6f4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
uses: mozilla-actions/sccache-action@v0.0.5

- name: Run clippy
run: cargo clippy --all-targets
run: cargo clippy --all-targets --workspace

crate_metadata:
name: Extract crate metadata
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ repos:
name: clippy
language: system
types: [file, rust]
entry: cargo clippy --all-targets -- -D warnings -Dclippy::dbg_macro # Use -D warnings option to ensure the job fails when encountering warnings
entry: cargo clippy --all-targets --workspace -- -D warnings -Dclippy::dbg_macro # Use -D warnings option to ensure the job fails when encountering warnings
pass_filenames: false
- id: test
name: test
Expand Down
2 changes: 1 addition & 1 deletion crates/pixi_manifest/src/target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ mod tests {
.dependencies(None)
.unwrap_or_default()
.iter()
.map(|(name, spec)| format!("{} = {}", name.as_source(), spec.as_version_spec().unwrap().to_string()))
.map(|(name, spec)| format!("{} = {}", name.as_source(), spec.as_version_spec().unwrap()))
.join("\n"), @r###"
run = ==2.0
host = ==2.0
Expand Down
5 changes: 1 addition & 4 deletions crates/pixi_spec/src/serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,10 +350,7 @@ mod test {
for input in examples {
let spec: Result<PixiSpec, _> = serde_json::from_value(input.clone());
let result = match spec {
Ok(spec) => {
let spec = PixiSpec::from(spec);
serde_json::to_value(&spec).unwrap()
}
Ok(spec) => serde_json::to_value(&spec).unwrap(),
Err(e) => {
json!({
"error": format!("ERROR: {e}")
Expand Down

0 comments on commit 345e6f4

Please sign in to comment.