Skip to content

Add ShellCheck and shfmt Lint Tasks to the VS Code Task Snippets - #4395

Merged
ptr727 merged 4 commits into
developfrom
burndown/vscode-lint-shell-tasks
Nov 24, 2026
Merged

ptr727 merged 4 commits into
developfrom
burndown/vscode-lint-shell-tasks

Conversation

@ptr727

@ptr727 ptr727 commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds ShellCheck and shfmt to the Lint group of both VS Code task snippets, per the maintainer's answer on #4064 (option 1), and corrects the Lint group comments #3536 raised.

  • catalog/snippets/configs/vscode-tasks.json and vscode-tasks-python.json gain Lint: ShellCheck and Lint: shfmt. Each runs hub_fetch_run.py scripts/docker_lint.py --linter shellcheck (or shfmt), the same shape as the existing wrapper tasks, so it takes the wrapper's digest pin, read-only snapshot, and disabled networking. Lint: All includes both.
  • Lint: All now runs Lint: EOL before Lint: Prose. A dependsOrder: sequence stops at its first failure, and the whole-repo prose run is the step most likely to fail where CI runs prose diff-scoped.
  • The group comment drops "It mirrors the CI lint gate", since PSScriptAnalyzer stays out of the default group. A carrier holding PowerShell adds a Lint: PSScriptAnalyzer task the same way, which a comment line now says.
  • "the EOL gate over the whole tree" becomes "the EOL configuration check", since repo_gate.py --check eol compares .editorconfig and .gitattributes and reads no tracked file's endings.
  • Both snippets qualify the pre-commit claim to a hook that carries the doc gates. A hook running only dotnet husky run, or only a Python repo's formatter and type checker while it converges, runs neither. Both snippets' Lint: EOL line no longer calls the check the hook's own.
  • The Python snippet's language-group comment names the per-tree shape for a multi-directory python-directories input. Each tree's ruff and test tasks set options.cwd to the tree, and its "Python Types" to the directory CI's "Type check Python step" runs in: the tree where it configures its own checker, the root where it falls back to the root's config.
  • The Python snippet's "Every Lint task is language-agnostic" line drops "language-agnostic", which the shell linters make false.
  • GOVERNANCE.md "Running the Linters Locally (Known-Working Invocations)", the VS Code Lint tasks bullet: it names shell checks among the local surface, drops "Docker :latest" (the ShellCheck image is :stable), and calls the EOL check a configuration check.
  • tests/test_hub_fetch_run.py: LINT_TASKS takes both new tasks, so the existing tests pin each to the wrapper in both snippets and check the wrapper offers both linters. A new test holds Lint: All to every wrapper task, ending Lint: EOL, Lint: Prose.

Task labels follow the tools' own casing, ShellCheck and shfmt, per comment-and-doc-style "Naming tools in prose".

The PR carries the comments label because it rewrites and adds snippet comment lines the issues ask for.

Verification

  • In a fresh git repository holding only a README.md and hub_fetch_run.py, each new task's command (the python3 form and the uv run --no-project python form) exits 0, printing SKIP shellcheck: zero targets / SKIP shfmt: zero targets.
  • With a tracked bad.sh holding an unquoted $1, Lint: ShellCheck's command exits 1 on SC2086.
  • tests/test_hub_fetch_run.py passes. Against origin/develop's snippets the updated tests fail (the shell tasks missing, and Lint: All ending in Lint: EOL).
  • scripts/build_dist.py --check reports the generated skill trees current.

Closes on promotion: #4064, #3536

Pre-existing findings, not filed

Local review findings declined

  • catalog/snippets/husky/README.md:30 and catalog/snippets/pre-commit/README.md:55, "(Docker at :latest)": not made false here. Each sentence is about the workflow YAML, Markdown, spelling, and EditorConfig linters, and each of those images is :latest in the scripts/docker_lint.py LINTERS table. The new ShellCheck task's :stable image falls outside that sentence.

🤖 Generated with Claude Code

ptr727 and others added 3 commits November 23, 2026 20:28
Both snippets' Lint groups now run ShellCheck and shfmt through
scripts/docker_lint.py, the same way as the other container linters, and
Lint: All includes them. Lint: EOL now runs before Lint: Prose, since a
sequence stops at its first failure and the whole-repo prose run is the
one most likely to fail.

The group comments drop the false "mirrors the CI lint gate" claim, name
PSScriptAnalyzer as a carrier-added task, call the EOL check what it is,
and qualify the pre-commit claim for a hook running only Husky.Net. The
Python snippet names the per-tree shape for a multi-directory
python-directories input.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…he Doc Gates

A hook running only `dotnet husky run`, or only a Python repo's formatter
and type checker while it converges, runs neither doc gate. One condition
covers both snippets rather than a .NET-only qualifier.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
CI runs a declared subdirectory's type checker from the root where only
the root configures it, so only the ruff and test tasks move into the
tree. The Python snippet's Lint: EOL line now matches the .NET one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI lite review requested due to automatic review settings November 24, 2026 04:39
@ptr727 ptr727 added the comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses label Nov 24, 2026
@ptr727

ptr727 commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head c6fc5365b8d263177e3aad957eda25b8de5f7c95, the content this pull request carries at that commit against develop, and it recorded 1 finding.

@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 10 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 6cb4990 and 1f334e1.

Files selected for processing: 4

  • GOVERNANCE.md
  • catalog/snippets/configs/vscode-tasks-python.json
  • catalog/snippets/configs/vscode-tasks.json
  • tests/test_hub_fetch_run.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CI runs a tree's type checker inside the tree where the tree configures
it, and from the root only where it falls back to the root's config.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

An active finding remains because the Python Types task documentation does not clearly specify the directory-specific working directory, which could cause checks to run from the workspace root instead of the intended directory.

1 open issue
What changed in this PR

Adds ShellCheck and shfmt tasks to the VS Code lint-task snippets through the secure Docker lint wrapper, while updating related governance guidance and regression tests.

Changes:

  • Adds ShellCheck and shfmt tasks to the standard and Python VS Code snippets.
  • Updates Lint: All ordering so EOL checks run before whole-repository prose checks.
  • Clarifies hook, EOL, shell-lint, PowerShell, and multi-directory Python guidance.
  • Extends tests to validate wrapper commands, linter availability, and aggregate ordering.
File Description
tests/​test_hub_fetch_run.py Verifies wrapper usage for the new shell linter tasks, linter availability, and Lint: All ordering.
GOVERNANCE.md Updates local linting guidance to include shell checks and EOL configuration validation.
catalog/​snippets/​configs/​vscode-tasks.json Adds ShellCheck and shfmt tasks to the standard VS Code configuration and includes them in Lint: All.
catalog/​snippets/​configs/​vscode-tasks-python.json Adds shell-lint tasks and updates aggregate ordering and Python multi-directory guidance.

Review effort: Lite

@ptr727

ptr727 commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 1f334e140a5e220b46b34bbdb90687975cd7d38e, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@codecov

codecov Bot commented Nov 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.39%. Comparing base (b38e084) to head (1f334e1).
⚠️ Report is 320 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4395      +/-   ##
===========================================
- Coverage    81.60%   79.39%   -2.22%     
===========================================
  Files           26       46      +20     
  Lines         9070    16070    +7000     
===========================================
+ Hits          7402    12758    +5356     
- Misses        1668     3312    +1644     
Flag Coverage Δ
python-3.13 79.39% <ø> (-2.22%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ptr727

ptr727 commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@ptr727

ptr727 commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

/review

@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ptr727
ptr727 merged commit c0ab721 into develop Nov 24, 2026
14 checks passed
@ptr727
ptr727 deleted the burndown/vscode-lint-shell-tasks branch November 24, 2026 05:02
ptr727 added a commit that referenced this pull request Nov 24, 2026
…lts, Secret Sync Fields, and Audit Account Fixes (#4428)

Promotes the 28 pull requests that landed on develop since the last
promotion (#4388), from the away-mode backlog burndown run.

- #4391: Drop the false XML comment suppression claim from the .NET
conventions.
- #4390: Blank quotations after a heredoc label on its opening line in
the paste-safe rule.
- #4392: Carry attention lists, cut lists, and opt-in billing in the
`backlog_metrics.py` JSON.
- #4393: Gate `configure.sh apply`'s interaction limit on a committed
bot verification record.
- #4394: Make the gh and node report note say a one-line vendor source
is configured.
- #4395: Add ShellCheck and shfmt lint tasks to the VS Code task
snippets.
- #4396: Count a CodeRabbit clean pass on the head in the digest's
`other_reviewed`.
- #4401: Date the line-ending intentRefs by the skill and trim advisory
restatements.
- #4399: Share one any-level heading region primitive between
`heading_body` and `extract_anchored`.
- #4398: Name the hub pull requests a standup lands through, and add
HACS first-run guidance.
- #4404: Add a PowerShell section to CODESTYLE.md and narrow the shell
rule.
- #4405: Close AUDIT.md section 10's convergence loop and fix three
skill pointers.
- #4409: Route CODESTYLE.md's General section to the language skills
(part of #1153, which stays open).
- #4410: Detect a C# test project by its own text rather than its file
name.
- #4411: Drop the unruled "working gate is not drift" sentence from
CODESTYLE.md.
- #4412: Track the newest upstream line of each pinned host tool.
- #4413: Correct AUDIT.md section 0's account of what the audit checks.
- #4416: Add a required coverage shield class to the README audit.
- #4414: Tie drive-pr's merge to its authorization and align the pass
moments.
- #4417: Pass over a second SIGTERM in `pr_review.py` so an interrupt
prints one line.
- #4418: Point the report-path placeholder at AUDIT.md section 8.
- #4419: Correct the audit account copies outside AUDIT.md section 0.
- #4422: Drop the archived DevKitCIoT from the rollout checklists.
- #4423: Report a stale `pullRequestCheck: false` and correct AUDIT.md
section 6.
- #4424: Add a `prune` subcommand to retire orphaned canonical review
passes.
- #4425: Drop the archived DevKitCIoT from the reusable-workflows
checklists and fix a normalization docstring.
- #4427: Store secret sync metadata in item fields, not 1Password tags.
- #4426: Declare and apply the Actions workflow token defaults through
`configure.sh` (the `configure.sh` part of #1783, which stays open).

## Owed by the maintainer

- #4412: A live run of the new host-tool line tracker. Scheduled runs
start only once this reaches `main`, and a `workflow_dispatch` would
prove it sooner.
- #4426: A fleet `configure.sh apply` for the workflow token defaults,
after the per-repository read the 2026-11-01 answer requires. Please
also confirm the new `--lower-workflow-token` option, which a `write`
repository needs for the apply to lower its default.
- #4427: Run `python3 scripts/secrets_sync.py selftest`, then the
cleanup script in that pull request's body (`move_sync_tags.py`, dry run
first, then `--apply`). Until that runs, every un-migrated secret item
refuses to sync.
- #4393: The pilot's first interaction limit is set by hand in its
settings and its bots verified there. The verification record is
committed afterwards through a hub pull request, and only then does
`apply` set the limit fleet-wide.
- A fleet resync is owed, because carried text changed: AGENTS.md,
GOVERNANCE.md, CODESTYLE.md, and several skills.

Fixes #4387
Fixes #4383
Fixes #4284
Fixes #1095
Fixes #4299
Fixes #4370
Fixes #4364
Fixes #4173
Fixes #4064
Fixes #3536
Fixes #3929
Fixes #3808
Fixes #3812
Fixes #3810
Fixes #4320
Fixes #4232
Fixes #1748
Fixes #1607
Fixes #1270
Fixes #1170
Fixes #3692
Fixes #4415
Fixes #3908
Fixes #1648
Fixes #4276

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants