-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Labels
automationcode-qualitycookieIssue Monster Loves Cookies!Issue Monster Loves Cookies!refactoringtask-miningworkflows
Description
Description
Shellcheck (SC2166) identified 15 workflows using the deprecated -a operator in test expressions. This should be replaced with && for better portability and POSIX compliance.
Affected Workflows
.github/workflows/ai-moderator.md.github/workflows/archie.md.github/workflows/brave.md.github/workflows/cloclo.md.github/workflows/craft.md.github/workflows/dev.md.github/workflows/dictation-prompt.md.github/workflows/example-workflow-analyzer.md.github/workflows/github-mcp-structural-analysis.md.github/workflows/grumpy-reviewer.md.github/workflows/jsweep.md.github/workflows/mcp-inspector.md.github/workflows/plan.md.github/workflows/q.md.github/workflows/sergo.md
Problem Pattern
Problematic Code:
if [ "$a" = "x" -a "$b" = "y" ]; then
# do something
fiCorrect Code:
if [ "$a" = "x" ] && [ "$b" = "y" ]; then
# do something
fiWhy This Matters
- Portability:
-aoperator may fail on some shells - POSIX Compliance:
&&is the recommended approach - Best Practices: Modern shell scripting guidelines prefer
&&
Success Criteria
- All 15 workflows updated to use
&&instead of-a - Workflows recompiled with
make recompile - No SC2166 warnings in next static analysis scan
- All existing tests pass
Source
Extracted from Static Analysis Report discussion #12036
Finding: SC2166 - Deprecated Test Syntax (15 occurrences)
Severity: Warning
Priority: Medium
Automation Potential: High
Recommended Approach
- Create a script to identify and replace
-apatterns - Test on 2-3 workflows first
- Deploy in batches of 5 workflows
- Run
make recompileafter each batch - Verify with
make lint
Shellcheck Reference
See [SC2166]((redacted) for detailed explanation of this issue.
AI generated by Discussion Task Miner - Code Quality Improvement Agent
- expires on Feb 10, 2026, 9:06 PM UTC
Reactions are currently unavailable
Metadata
Metadata
Labels
automationcode-qualitycookieIssue Monster Loves Cookies!Issue Monster Loves Cookies!refactoringtask-miningworkflows