Skip to content

fix(setup): '//' is not a shell comment - #373

Merged
hyperpolymath merged 1 commit into
mainfrom
fix/shellcheck-parse-error
Aug 28, 2026
Merged

fix(setup): '//' is not a shell comment#373
hyperpolymath merged 1 commit into
mainfrom
fix/shellcheck-parse-error

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Line 3 used a C-style '//' comment in a bash script. '//' is not a comment — bash tries to execute it, so the script emitted a 'No such file or directory' error on every run and shellcheck could not parse the file at all. Changed to '#'.

Found by an estate-wide shellcheck sweep of 5,111 tracked scripts across 375 repos. This file was one of 11 that fail to parse (SC1073/SC1072) — shellcheck stops analysing at the failure, so everything after it was never checked either.

Verified: shellcheck -S error now reports 0 findings for this file.

Line 3 used a C-style '//' comment in a bash script. '//' is not a comment — bash tries to execute it, so the script emitted a 'No such file or directory' error on every run and shellcheck could not parse the file at all. Changed to '#'.

Found by an estate-wide shellcheck sweep of 5,111 tracked scripts across 375
repos. This file was one of 11 that fail to PARSE (SC1073/SC1072) — shellcheck
stops analysing at the failure, so anything after it was never checked either.

Verified: shellcheck -S error now reports 0 findings for this file.
@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

Next included review available in 55 minutes.

View limit details

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

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

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 20647b44-438d-4ab1-a452-488159109e76

📥 Commits

Reviewing files that changed from the base of the PR and between ccc3d75 and 7065d52.

📒 Files selected for processing (1)
  • setup.sh
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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

Comment @coderabbitai help to get the list of available commands.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@gitar-bot

gitar-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

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 correctly identifies and addresses a critical syntax error in setup.sh where C-style comments (//) were used. In a shell environment, this would cause a runtime failure as the shell attempts to execute // as a command; this is particularly dangerous here due to the set -e directive, which would trigger an immediate termination of the script. Although the change aligns with the requirements, the PR lacks evidence of validation. It is essential to confirm that the script passes ShellCheck and executes correctly without parsing errors before it is merged.

Test suggestions

  • Run ShellCheck on setup.sh to ensure zero parsing errors.\n- [ ] Execute the script to verify that line 3 no longer produces a 'No such file or directory' error.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Run ShellCheck on setup.sh to ensure zero parsing errors.\n- [ ] Execute the script to verify that line 3 no longer produces a 'No such file or directory' error.

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

Comment thread setup.sh
#!/usr/bin/env bash
# SPDX-License-Identifier: MPL-2.0
// Owner: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
# Owner: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 MEDIUM RISK

Suggestion: The invalid // comment prefix must be replaced with # to ensure shell compatibility. The previous use of // would have caused a runtime error, which is fatal to the script given the set -e flag in the preamble.\n\nsuggestion\n# Owner: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>\n

@hyperpolymath
hyperpolymath enabled auto-merge (squash) August 28, 2026 07:49
@hyperpolymath
hyperpolymath merged commit dd454b2 into main Aug 28, 2026
3 checks passed
@hyperpolymath
hyperpolymath deleted the fix/shellcheck-parse-error branch August 28, 2026 16:16
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