goanalysis

package
v0.60.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2025 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package goanalysis implement go static analysis using Analyzer that are not included in the default "go vet", but included in the passes directory, including

  • fieldalignment: detects structs that would use less memory if their fields were sorted.
  • nilness: inspects the control-flow graph of an SSA function and reports errors such as nil pointer dereferences and degenerate nil pointer comparisons.
  • reflectvaluecompare: checks for accidentally using == or reflect.DeepEqual to compare reflect.Value values.
  • shadow: checks for shadowed variables.
  • sortslice: checks for calls to sort.Slice that do not use a slice type as first argument.
  • unusedwrite: checks for unused writes to the elements of a struct or array object.
  • waitgroup: detects simple misuses of sync.WaitGroup.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check()

Check run the static analysis. This function is not mean to be call directly, but used in the main func.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳