Documentation
¶
Overview ¶
Package mapdeletecheck implements a Go analysis linter that flags redundant map membership checks before a delete call such as "if _, ok := m[k]; ok { delete(m, k) }" which can be simplified to "delete(m, k)" since delete is a no-op for missing keys.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Analyzer = &analysis.Analyzer{ Name: "mapdeletecheck", Doc: "reports redundant map membership checks before delete(m, k) calls since delete is already a no-op for missing keys", URL: "https://github.com/github/gh-aw/tree/main/pkg/linters/mapdeletecheck", Requires: []*analysis.Analyzer{inspect.Analyzer, nolint.Analyzer, filecheck.Analyzer}, Run: run, }
Analyzer is the map-delete-check analysis pass.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.