• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

bombsimon / wsl / 24637868809
95%

Build:
DEFAULT BRANCH: main
Ran 19 Apr 2026 08:01PM UTC
Jobs 1
Files 4
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 Apr 2026 08:00PM UTC coverage: 94.444% (+0.03%) from 94.41%
24637868809

push

github

web-flow
Fix `go`/`defer` not inspecting anonymous function bodies (#255)

* Fix go/defer not inspecting anonymous function bodies for shared variables

`checkGo` and `checkDefer` used `maybeCheckExpr` which calls
`identsFromNode` with `skipBlock=true`, skipping any `BlockStmt`
including function literal bodies. This caused `go func() { use(x) }()`
to not recognize `x` as a shared variable, incorrectly flagging it as a
violation even when `x` was declared immediately above.

When the called expression is a `*ast.FuncLit`, route through
`checkCuddlingBlock` with the literal's body list instead, matching the
behavior of block-based checks like `for` and `range`.

Fixes #254

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Inline and remove maybeCheckExpr

Now that checkGo and checkDefer no longer use it, maybeCheckExpr is
only called from checkExprStmt. Inline the logic there and delete the
helper.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

59 of 59 new or added lines in 1 file covered. (100.0%)

1513 of 1602 relevant lines covered (94.44%)

333.16 hits per line

Jobs
ID Job ID Ran Files Coverage
1 24637868809.1 19 Apr 2026 08:01PM UTC 4
94.44
GitHub Action Run
Source Files on build 24637868809
  • Tree
  • List 4
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24637868809
  • beac84e5 on github
  • Prev Build on main (#24633981862)
  • Next Build on main (#24853561134)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc