memlint

package module
v0.0.0-...-65b21ef Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package memlint implements a static analyzer that enforces MemPipe's zero-allocation invariants on functions annotated with //mem:hot and //mem:nogc directives.

Rules:

ML001: No interface{}/any parameters or variables in //mem:hot functions
ML002: No make/new/append calls in //mem:nogc functions
ML003: No reflect usage in //mem:hot functions
ML004: No closures or defer in //mem:nogc functions (likely heap escape)
ML005: No ReadField/WriteField calls (use typed API instead)

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:     "memlint",
	Doc:      "enforces MemPipe zero-allocation invariants on //mem:hot and //mem:nogc functions",
	Requires: []*analysis.Analyzer{inspect.Analyzer},
	Run:      run,
}

Analyzer is the memlint analysis pass.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd
memlint command
Command memlint is a go/analysis-based static analyzer that enforces MemPipe's zero-allocation invariants.
Command memlint is a go/analysis-based static analyzer that enforces MemPipe's zero-allocation invariants.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL