Hacker News .hn
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
AnimalMuppet
on June 3, 2025
|
parent
|
context
|
favorite
| on:
(On | No) Syntactic Support for Error Handling
I would be
astonished
if there isn't an automated tool to check for that at the push of a button. I would be mildly surprised if there isn't a compiler flag to check for it.
arp242
on June 3, 2025
|
next
[–]
Not a compiler check, but staticcheck is widely used:
% staticcheck test.go test.go:7:2: this value of err is never used (SA4006)
dmitshur
on June 3, 2025
|
prev
|
next
[–]
Yeah, as one data point,
https://staticcheck.dev/docs/checks/#SA4006
has existed since 2017.
masklinn
on June 4, 2025
|
prev
[–]
There very much is not. There is a compiler error you can’t disable if a variable is
completely unused
and that is it.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: