Conversation
Adds a GitHub Actions job that shellchecks the bash scripts (setup,
create-gruvbox) and syntax-checks the zsh files with 'zsh -n'.
shellcheck cannot parse zsh, so those are only syntax-checked.
The three findings on setup, all fixed here:
SC2174 (warning) 'mkdir -p "$HOME"/.ssh --mode 700' -- with -p, -m
applies only to the deepest directory created, and not at all when
the directory already exists. ~/.ssh could therefore end up with
default permissions, which ssh refuses to use. Split into mkdir -p
followed by an unconditional chmod 700.
SC2086 unquoted $HOME/.gitconfig in setup_git.
SC2016 '#https_proxy=$http_proxy' is intentionally single-quoted --
it writes a commented template line to /etc/environment -- so it
gets an explanatory disable directive rather than a change.
Note shellcheck is narrower than I first assumed: it does not catch the
logic bugs fixed on the other branches (a destination-less git clone,
'-f' against a directory, '-d' against a file), since all are
well-formed shell. Verified locally with shellcheck 0.10.0: clean exit
on both scripts.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
The new workflow’s zsh syntax-check step doesn’t cover all zsh files it claims to (e.g., p10k.zsh and zpreztorc), leaving gaps in CI enforcement.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds CI linting for shell scripts and applies the three ShellCheck-driven fixes in setup to harden permissions and quoting.
Changes:
- Fix
~/.sshpermissions handling by separatingmkdir -pfrom an unconditionalchmod 700. - Quote
$HOME/.gitconfigpath and quote/etc/environmentingrepcalls; document intentional single-quoted proxy template line with a ShellCheck disable. - Add a GitHub Actions workflow to run
shellcheckon bash scripts andzsh -nsyntax checks on zsh files.
File summaries
| File | Description |
|---|---|
| setup | Addresses ShellCheck findings around directory permissions, quoting, and intentional literal output. |
| .github/workflows/shellcheck.yml | Introduces CI steps to lint bash scripts and syntax-check zsh scripts. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+22
to
+26
| - name: Check zsh syntax | ||
| run: | | ||
| sudo apt-get install -y zsh | ||
| zsh -n prestobuntu.zsh | ||
| zsh -n tmux-new-session.plugin.zsh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a GitHub Actions job that shellchecks the bash scripts (setup,
create-gruvbox) and syntax-checks the zsh files with 'zsh -n'.
shellcheck cannot parse zsh, so those are only syntax-checked.
The three findings on setup, all fixed here:
SC2174 (warning) 'mkdir -p "$HOME"/.ssh --mode 700' -- with -p, -m
applies only to the deepest directory created, and not at all when
the directory already exists. ~/.ssh could therefore end up with
default permissions, which ssh refuses to use. Split into mkdir -p
followed by an unconditional chmod 700.
SC2086 unquoted $HOME/.gitconfig in setup_git.
SC2016 '#https_proxy=$http_proxy' is intentionally single-quoted --
it writes a commented template line to /etc/environment -- so it
gets an explanatory disable directive rather than a change.
Note shellcheck is narrower than I first assumed: it does not catch the
logic bugs fixed on the other branches (a destination-less git clone,
'-f' against a directory, '-d' against a file), since all are
well-formed shell. Verified locally with shellcheck 0.10.0: clean exit
on both scripts.
🤖 Generated with Claude Code