sa5012

package
v0.0.0-...-40142f5 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = SCAnalyzer.Analyzer
View Source
var SCAnalyzer = lint.InitializeAnalyzer(&lint.Analyzer{
	Analyzer: &analysis.Analyzer{
		Name:      "SA5012",
		Run:       run,
		FactTypes: []analysis.Fact{new(evenElements)},
		Requires:  []*analysis.Analyzer{buildir.Analyzer},
	},
	Doc: &lint.Documentation{
		Title: "Passing odd-sized slice to function expecting even size",
		Text: `Some functions that take slices as parameters expect the slices to have an even number of elements. 
Often, these functions treat elements in a slice as pairs. 
For example, \'strings.NewReplacer\' takes pairs of old and new strings, 
and calling it with an odd number of elements would be an error.`,
		Since:    "2020.2",
		Severity: lint.SeverityError,
		MergeIf:  lint.MergeIfAny,
	},
})

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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