You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change executable_name to hold the full command string (#101)
* Remove redundant cargo check job from CI
The bare `cargo check` job only checked the lib/bin crates and was
strictly less thorough than the existing Test Suite and Lints jobs,
both of which compile all targets. The redundant job also introduced
a stale-cache risk: if its artifacts were reused from a prior run,
compile errors in source files could go undetected.
Removing it so that Test Suite (cargo test) and Lints
(cargo clippy --all-targets) are the authoritative compile checks.
* Add Rust build cache to CI and restore cargo check job
Uses Swatinem/rust-cache@v2 in the Check, Test Suite, and Lints jobs.
Setting cache-on-failure: false (the default) ensures that a failed
build never writes a stale cache entry, which is how a missing import
in #89 was able to pass CI despite being a compile error.
Restores the cargo check job that was removed in the prior commit,
since it gives a clearer signal for compile errors than a mixed
test/lint failure.
* Revert "Add Rust build cache to CI and restore cargo check job"
This reverts commit 2050667.
* Revert "Remove redundant cargo check job from CI"
This reverts commit d2679fa.
* Change executable_name to hold the full command string
Previously, executable_name held just the binary name and the error
message hardcoded " generate" as the subcommand:
format!("CODEOWNERS out of date. Run `{} generate` ...", executable_name)
This made it impossible for wrappers (like the code_ownership Ruby gem)
to show the correct command in the error message, since their update
command is not "<binary> generate".
Now executable_name holds the full command to run. The format string
no longer appends " generate". The default changes from "codeowners"
to "codeowners generate" so existing behavior is preserved for users
who do not customize the field.
Users with a custom executable_name in config/code_ownership.yml will
need to append their subcommand — e.g. change:
executable_name: my-tool
to:
executable_name: my-tool generate
Copy file name to clipboardExpand all lines: src/ownership/validator.rs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -169,7 +169,7 @@ impl Error {
169
169
Error::FileWithoutOwner{path: _ } => "Some files are missing ownership".to_owned(),
170
170
Error::FileWithMultipleOwners{path: _,owners: _ } => "Code ownership should only be defined for each file in one way. The following files have declared ownership in multiple ways".to_owned(),
0 commit comments