golang/go
x/tools/gopls/internal/analysis: analyzer for slice aliasing mistakes
開放
#73,830 建立於 2025年5月22日
倉庫指標
- 星標
- (133,883 顆星)
- PR 合併指標
- (PR 指標待抓取)
描述
In a discussion about slice aliasing bugs, @randall77 suggested an analyzer that detects "aliasing of two slice variables, where the capacity of the slice is unknown (due to append starting from nil, say), and then an append on each of the aliased slices". We should prototype a simple analyzer to detect this pattern and see what turns up.