staticlint

command
v0.0.0-...-803e70e Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

The package is used to combine analyzers. Built on the basis of multichecker golang.org/x/tools/go/analysis/multichecker.

The package includes the following analyzers from the package golang.org/x/tools/go/analysis:

  • assign (defines an Analyzer that detects useless assignments)
  • atomic (defines an Analyzer that checks for common mistakes using the sync/atomic package)
  • bools (defines an Analyzer that detects common mistakes involving boolean operators)
  • defers (defines an Analyzer that checks for common mistakes in defer statements)
  • errorsas (defines an Analyzer that checks that the second argument to errors.As is a pointer to a type implementing error)
  • fieldalignment (defines an Analyzer that detects structs that would use less memory if their fields were sorted)
  • loopclosure (defines an Analyzer that checks for references to enclosing loop variables from within nested functions)
  • printf (defines an Analyzer that checks consistency of Printf format strings and arguments)
  • stringintconv (defines an Analyzer that flags type conversions from integers to strings)
  • structtag (defines an Analyzer that checks struct field tags are well formed)

The package includes the following analyzers from the package honnef.co/go/tools/:

  • simple (contains analyzes that simplify code)
  • staticcheck (contains analyzes that find bugs and performance issues)
  • stylecheck (contains analyzes that enforce style rules)

The package includes analyzer from the package "github.com/tommy-muehle/go-mnd/v2", that detect "magic numbers".

The package includes analyzer "exitchecker",

that checks a direct call to `os.Exit` in the main function of the main package.

Jump to

Keyboard shortcuts

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