Commit 4bd4104
ci: fix brew style violations in generated cask (#9)
## Summary
\`brew test-bot\` is failing on \`abizer/homebrew-tap\` master ([run
25410956395](https://github.com/abizer/homebrew-tap/actions/runs/25410956395))
because the v2.4.1-generated \`Casks/nssh.rb\` has two RuboCop offenses:
1. \`Style/IfUnlessModifier\` — multi-line \`if OS.mac?\` for a single
statement. Rewritten as modifier-if.
2. \`Layout/EmptyLinesAroundBlockBody\` — blank line before the cask's
closing \`end\`, courtesy of goreleaser's \`# No zap stanza required\`
placeholder. Replaced by a real \`zap.trash\` stanza listing the dirs
nssh writes locally (\`~/.local/state/nssh\`, \`~/.config/nssh\`).
## Test plan
- [ ] Merge → cut a \`patch\` release (v2.4.2) → confirm goreleaser
pushes a fresh \`Casks/nssh.rb\` to the tap
- [ ] \`brew test-bot\` on the tap goes green
- [ ] On macOS: \`brew install --cask abizer/tap/nssh\`; \`nssh\`
launches without Gatekeeper alert; \`brew uninstall --cask --zap nssh\`
cleans up local state
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Low risk: only adjusts GoReleaser Homebrew cask generation to satisfy
`brew style`, without changing app runtime behavior beyond uninstall
cleanup metadata.
>
> **Overview**
> Updates `.goreleaser.yaml` to change the generated Homebrew cask: the
post-install quarantine removal hook is rewritten as a single-line
modifier `if OS.mac?` to satisfy RuboCop.
>
> Adds an explicit `zap.trash` section (listing `~/.local/state/nssh`
and `~/.config/nssh`) to avoid GoReleaser emitting the `# No zap stanza
required` placeholder that was causing `brew style` empty-line
violations.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
f88fc8b. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 08d386c commit 4bd4104
1 file changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
48 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
49 | 54 | | |
50 | 55 | | |
51 | 56 | | |
| |||
0 commit comments