Skip to content

Commit

Permalink
feat: use cargo script
Browse files Browse the repository at this point in the history
  • Loading branch information
indietyp committed Apr 21, 2024
1 parent a9a271a commit a4aee71
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
11 changes: 6 additions & 5 deletions .github/scripts/rust/lint.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
//! ```cargo
//! [dependencies]
//! serde = {version = "*", features = ["derive"]}
//! toml = {version = "*", features = ["parse"]}
//! ```
#!/usr/bin/env -S cargo +nightly -Zscript
```cargo
[dependencies]
serde = {version = "*", features = ["derive"]}
toml = {version = "*", features = ["parse"]}
```

#![allow(non_snake_case)]

Expand Down
6 changes: 1 addition & 5 deletions .justfile
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,6 @@ install-cargo-hack:
install-cargo-nextest:
@just install-cargo-tool 'cargo nextest' cargo-nextest 0.9.37

[private]
install-rust-script:
@just install-cargo-tool 'rust-script' rust-script 0.23.0

[private]
install-llvm-cov:
@just install-cargo-tool 'cargo llvm-cov' cargo-llvm-cov 0.5.9
Expand All @@ -131,7 +127,7 @@ install-cargo-insta:
[private]
[no-cd]
lint-toml mode:
@rust-script "{{repo}}/.github/scripts/rust/lint.rs" {{mode}} `cargo metadata --no-deps --format-version 1 | jq '.workspace_root' -r`
@cargo run --manifest-path "{{repo}}/.github/scripts/rust/lint.rs" {{mode}} `cargo metadata --no-deps --format-version 1 | jq '.workspace_root' -r`

# Runs all linting commands and fails if the CI would fail
[no-cd]
Expand Down
12 changes: 6 additions & 6 deletions Cargo.lock

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

0 comments on commit a4aee71

Please sign in to comment.