Re:Deadcode: Finding unreachable functions in Go
by codeflo on Tuesday January 23, 2024 @02:01PM
(#39107977)
I still find Go too tolerant on this. It should scan your Git history and stash as well, and fail to compile if it finds any unused code there.
[ Parent
| on HN ]
Re:Deadcode: Finding unreachable functions in Go
by SuperCuber on Tuesday January 23, 2024 @02:44PM
(#39108659)
That'd still be a bit too tolerant for my tastes. It should also scan your future commits.
Re:Deadcode: Finding unreachable functions in Go
by viscanti on Tuesday January 23, 2024 @02:57PM
(#39108866)
That'd still be a bit too tolerant for my tastes. It should have some kind of reinforcement signal that's stronger than just preventing the code from compiling. Some kind of shock therapy to help users learn and internalize things might be more appropriate here.
Re:Deadcode: Finding unreachable functions in Go
by lainga on Tuesday January 23, 2024 @03:04PM
(#39108957)
go vet -basilisk ./...
Re:Deadcode: Finding unreachable functions in Go
by yobert on Tuesday January 23, 2024 @03:00PM
(#39108909)
Really it needs to scan my coworkers commits as well. Can't be too careful.
Re:Deadcode: Finding unreachable functions in Go
by jerf on Tuesday January 23, 2024 @02:48PM
(#39108727)
Ah, I know the programming language for you: https://news.ycombinator.com/item?id=5002597
Re:Deadcode: Finding unreachable functions in Go
by mseepgood on Tuesday January 23, 2024 @03:15PM
(#39109113)
Could you please expand on this? Why would local Git stashes relate to code quality?
Re:Deadcode: Finding unreachable functions in Go
by erik_seaberg on Tuesday January 23, 2024 @03:55PM
(#39109666)
That comment might not be entirely serious.