# alias-analyzer **Repository Path**: mirrors_wallyqs/alias-analyzer ## Basic Information - **Project Name**: alias-analyzer - **Description**: A static analyzer for Go that detects dangerous slice aliasing with unknown capacity. - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-05-30 - **Last Updated**: 2026-04-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # slicealias ⚠️ A static analyzer for Go that detects dangerous slice aliasing with unknown capacity. ## What It Does This analyzer finds cases where a slice is aliased (e.g., `b := a`) and both are independently appended to without ensuring enough capacity. This can lead to bugs due to unexpected memory divergence. ### Example ```go func broken() { a := make([]int, 0) // unknown capacity b := a // alias b = append(b, 1) // Warning: alias of unknown-cap slice a = append(a, 2) // fine } ``` ## Usage ```bash go install github.com/nitinmewar/alias-analyser@latest # or clone and run manually go run . ./slicetest ``` ## Development Run tests with : ```bash go test ./... ``` ## Status This is a WIP and not yet part of golang.org/x/tools/go/analysis/passes.