package sa1010

import "honnef.co/go/tools/staticcheck/sa1010"

Index

Variables

var Analyzer = SCAnalyzer.Analyzer
var SCAnalyzer = lint.InitializeAnalyzer(&lint.Analyzer{
	Analyzer: &analysis.Analyzer{
		Name:     "SA1010",
		Requires: []*analysis.Analyzer{buildir.Analyzer},
		Run:      callcheck.Analyzer(checkRegexpFindAllRules),
	},
	Doc: &lint.RawDocumentation{
		Title: `\'(*regexp.Regexp).FindAll\' called with \'n == 0\', which will always return zero results`,
		Text: `If \'n >= 0\', the function returns at most \'n\' matches/submatches. To
return all results, specify a negative number.`,
		Since:    "2017.1",
		Severity: lint.SeverityWarning,
		MergeIf:  lint.MergeIfAny,
	},
})

Functions

func RepeatZeroTimes

func RepeatZeroTimes(name string, arg int) callcheck.Check

Source Files

sa1010.go

Version
v0.6.1 (latest)
Published
Mar 5, 2025
Platform
windows/amd64
Imports
7 packages
Last checked
4 hours ago

Tools for package owners.