Skip to content

chore(bash-lint): remove SC2034 disable directives by using _i loop variable - #1739

Merged
jamesadevine merged 1 commit into
mainfrom
bash-hygiene/remove-sc2034-mcpg-wait-loops-327643dca18a831f
Jul 31, 2026
Merged

chore(bash-lint): remove SC2034 disable directives by using _i loop variable#1739
jamesadevine merged 1 commit into
mainfrom
bash-hygiene/remove-sc2034-mcpg-wait-loops-327643dca18a831f

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

What the lint found

Two # shellcheck disable=SC2034 directives remain in src/compile/agentic_pipeline.rs for MCPG wait-N-times loops (previously at lines 2878 and 2896):

# shellcheck disable=SC2034 # i is intentionally unused; wait-N-times loop
for i in $(seq 1 30); do
  ...
done
# shellcheck disable=SC2034 # i is intentionally unused; wait-N-times loop
for i in $(seq 1 15); do
  ...
done

How it was fixed

Rule: SC2034 — variable assigned but unused.

Fix: Replace for i in with for _i in. In POSIX-compatible shells, a variable name beginning with _ is the conventional signal that the value is intentionally unused. shellcheck honours this convention and suppresses SC2034 for _-prefixed names, so the inline disable comments can be dropped entirely.

Files touched: src/compile/agentic_pipeline.rs (2 lines changed, 4 lines removed).

Verification

ENFORCE_BASH_LINT=1 cargo test --test bash_lint_tests  ✅
cargo test                                              ✅
cargo clippy --all-targets                              ✅

No remaining shellcheck disable=SC2034 directives in the source tree.

Warning

Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • releaseassets.githubusercontent.com
  • spsprodeus21.vssps.visualstudio.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "releaseassets.githubusercontent.com"
    - "spsprodeus21.vssps.visualstudio.com"

See Network Configuration for more information.

Generated by Bash Step Hygiene Auditor · 49.6 AIC · ⌖ 12.2 AIC · ⊞ 8.4K ·

…ariable

Replace 'for i in $(seq ...)' with 'for _i in $(seq ...)' in the two
MCPG wait-N-times loops in agentic_pipeline.rs. The loop variable was
already intentionally unused; using a conventional _-prefixed name is
the idiomatic shell fix and lets the inline disable comments be dropped.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@github-actions github-actions Bot mentioned this pull request Jul 31, 2026
@jamesadevine
jamesadevine marked this pull request as ready for review July 31, 2026 20:52
@jamesadevine
jamesadevine merged commit 6757325 into main Jul 31, 2026
7 checks passed
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant