Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 10, 2025

Shellcheck flagged --output-dir in backticks within heredoc content as potential command flags (SC2215). The text was markdown documentation, not shell code.

Changes

  • Removed backticks from pkg/workflow/sh/playwright_prompt.md: `--output-dir`--output-dir
  • Recompiled affected workflows: blog-auditor.lock.yml, unbloat-docs.lock.yml

Removing the backticks prevents shellcheck from misinterpreting markdown formatting as shell syntax within the heredoc.

-**This is the Playwright `--output-dir` and you can find...**
+**This is the Playwright --output-dir and you can find...**

Eliminates 2 SC2215 warnings. No functional changes.

Original prompt

This section details on the original issue you should resolve

<issue_title>[task] Fix SC2215 flag-as-command issues in blog-auditor and unbloat-docs</issue_title>
<issue_description>## Objective
Review and fix command syntax issues in blog-auditor and unbloat-docs workflows that are triggering SC2215 warnings.

Context

Static analysis identified 2 SC2215 warnings ("This flag is used as a command name. Bad line break or missing [ .. ]?") which may indicate formatting problems or incorrect shell syntax.

Related to discussion #3527.

Approach

  1. Review the workflow files for blog-auditor and unbloat-docs
  2. Identify lines where flags appear as command names
  3. Check for:
    • Missing command before flags
    • Incorrect line breaks in multi-line commands
    • Missing test brackets [ ] in conditional statements
  4. Fix syntax issues while preserving functionality

Files to Modify

  • .github/workflows/blog-auditor.md
  • .github/workflows/unbloat-docs.md

Acceptance Criteria

  • Command syntax corrected in both workflows
  • Run gh aw compile blog-auditor --actionlint shows no SC2215 warnings
  • Run gh aw compile unbloat-docs --actionlint shows no SC2215 warnings
  • Workflows compile successfully
  • Test workflows to ensure functionality unchanged

Impact

Eliminates 2 potential syntax errors and improves workflow reliability.
Related to #3527

AI generated by Plan Command for discussion #3527</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix SC2215 flag-as-command issues in workflows Fix SC2215 shellcheck warnings in Playwright prompt heredoc Nov 10, 2025
Copilot AI requested a review from pelikhan November 10, 2025 14:39
Copilot finished work on behalf of pelikhan November 10, 2025 14:39
@pelikhan
Copy link
Contributor

@copilot remove the backticks

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 10, 2025

@copilot remove the backticks

Done. Removed backticks entirely in dd3d83f. The text now reads --output-dir without any formatting, which prevents the SC2215 shellcheck warning while maintaining readability.

Copilot finished work on behalf of pelikhan November 10, 2025 16:03
@pelikhan pelikhan marked this pull request as ready for review November 10, 2025 20:49
Copilot AI review requested due to automatic review settings November 10, 2025 20:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes SC2215 shellcheck warnings in two compiled workflow files by removing backticks around the --output-dir flag reference in markdown documentation embedded within a heredoc. The shellcheck warning was triggered because flags in backticks can be misinterpreted as shell commands.

Key changes:

  • Modified pkg/workflow/sh/playwright_prompt.md to remove backticks from --output-dir
  • Recompiled blog-auditor.lock.yml and unbloat-docs.lock.yml to propagate the change

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
pkg/workflow/sh/playwright_prompt.md Removed backticks from --output-dir reference to prevent SC2215 warning
.github/workflows/blog-auditor.lock.yml Regenerated workflow file reflecting source markdown changes
.github/workflows/unbloat-docs.lock.yml Regenerated workflow file reflecting source markdown changes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

## Playwright Output Directory

**IMPORTANT**: When using Playwright tools to take screenshots or generate files, **all output files are automatically saved to `/tmp/gh-aw/mcp-logs/playwright/`**. This is the Playwright `--output-dir` and you can find any screenshots, traces, or other files generated by Playwright in this directory.
**IMPORTANT**: When using Playwright tools to take screenshots or generate files, **all output files are automatically saved to `/tmp/gh-aw/mcp-logs/playwright/`**. This is the Playwright --output-dir and you can find any screenshots, traces, or other files generated by Playwright in this directory.
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

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

The removal of backticks around --output-dir creates inconsistent markdown formatting. The same line still contains backticks around `/tmp/gh-aw/mcp-logs/playwright/`, which could also trigger shellcheck warnings.

Consider one of these approaches for consistency:

  1. Suppress SC2215 in the shellcheck disable directive (preferred): Update shellcheckDisableBackticks constant in pkg/workflow/sh.go from "# shellcheck disable=SC2006,SC2287\n" to "# shellcheck disable=SC2006,SC2215,SC2287\n" and revert this change
  2. Remove all backticks: Also remove backticks from the path: all output files are automatically saved to /tmp/gh-aw/mcp-logs/playwright/

The first approach is preferred because:

  • It's consistent with how SC2006/SC2287 are handled
  • It preserves markdown code formatting for documentation
  • Other .md files in pkg/workflow/sh/ use backticks extensively (see github_context_prompt.md, edit_tool_prompt.md, pr_context_prompt.md)
Suggested change
**IMPORTANT**: When using Playwright tools to take screenshots or generate files, **all output files are automatically saved to `/tmp/gh-aw/mcp-logs/playwright/`**. This is the Playwright --output-dir and you can find any screenshots, traces, or other files generated by Playwright in this directory.
**IMPORTANT**: When using Playwright tools to take screenshots or generate files, **all output files are automatically saved to `/tmp/gh-aw/mcp-logs/playwright/`**. This is the Playwright `--output-dir` and you can find any screenshots, traces, or other files generated by Playwright in this directory.

Copilot uses AI. Check for mistakes.
@pelikhan pelikhan merged commit a920460 into main Nov 10, 2025
76 of 80 checks passed
@pelikhan pelikhan deleted the copilot/fix-sc2215-flag-command-issues branch November 10, 2025 20:52
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.

[task] Fix SC2215 flag-as-command issues in blog-auditor and unbloat-docs

2 participants