golang/go

x/tools/gopls/internal/analysis: analyzer for slice aliasing mistakes

Open

#73,830 opened on 2025年5月22日

GitHub で見る
 (16 comments) (2 reactions) (0 assignees)Go (133,883 stars) (19,008 forks)batch import
AnalysisFeatureRequestToolsgoplsgopls/analysishelp wanted

説明

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.

コントリビューターガイド

x/tools/gopls/internal/analysis: analyzer for slice aliasing mistakes · golang/go#73830 | Good First Issue