feat: support shellcheck runner - #12
Conversation
|
Thank you for this. It is the first outside contribution to the project, and it is a good one. What I like: you covered the pass, fail, and ambiguous cases separately, and you return Four things to fix before this leaves draft. 1. The evidence line shows a URL instead of the findingShellCheck prints every finding twice. Once as the diagnostic, and again at the bottom as a wiki link. Both contain the So the user sees a URL where they should see the offending line. The test does not catch this, because the URL also contains Scanning forward and skipping the link fixes it, and gives you a count too: let evidence = output
.lines()
.find(|line| diagnostic.is_match(line) && !line.contains("shellcheck.net"))
.map(|line| line.trim().to_string());
let count = output
.lines()
.filter(|line| diagnostic.is_match(line) && !line.contains("shellcheck.net"))
.count() as u32;
return (Outcome::Failed, None, Some(count), evidence);And a stronger assertion: let evidence = bad.evidence_line.as_deref().unwrap_or_default();
assert!(
evidence.contains("SC2086") && !evidence.contains("shellcheck.net"),
"evidence should quote the finding, not the wiki URL: {evidence}"
);2. Please rebase on main
git fetch upstream && git rebase upstream/mainI tried this locally. With the fix above, all 93 tests pass. 3. Change
|
Summary
SC####diagnostics, and ambiguous outputTesting
cargo fmt --checkgit diff --checkcargo testand Clippy could not compile locally because required locked crates were unavailable offline; this draft relies on hosted CI for those gates.Closes #3.