checklocks

package
v0.0.0-...-8940ca0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: Apache-2.0, MIT Imports: 12 Imported by: 0

Documentation

Overview

Package checklocks performs lock analysis to identify and flag unprotected access to annotated fields.

For detailed usage refer to README.md in the same directory.

Note that this package uses the built-in atomics, in order to avoid the use of our own atomic package. This is because our own atomic package depends on our own sync package, which includes lock dependency analysis. This in turn requires goid, which introduces a dependency cycle. To avoid this, we simply use the simpler, built-in sync package.

+checkalignedignore

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:     "checklocks",
	Doc:      "checks lock preconditions on functions and fields",
	Run:      run,
	Requires: []*analysis.Analyzer{buildssa.Analyzer},
	FactTypes: []analysis.Fact{
		(*atomicAlignment)(nil),
		(*lockGuardFacts)(nil),
		(*lockFunctionFacts)(nil),
	},
}

Analyzer is the main entrypoint.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd
checklocks
Binary checklocks is a `vettool` for `go vet`.
Binary checklocks is a `vettool` for `go vet`.

Jump to

Keyboard shortcuts

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