golang/go
在 GitHub 查看x/tools/gopls/internal/analysis: analyzer for slice aliasing mistakes
Open
#73,830 创建于 2025年5月22日
AnalysisFeatureRequestToolsgoplsgopls/analysishelp wanted
仓库指标
- Star
- (133,883 star)
- PR 合并指标
- (30 天内没有已合并 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.