toolshonnef.co/go/tools/simple/s1007 Index | Files

package s1007

import "honnef.co/go/tools/simple/s1007"

Index

Variables

var Analyzer = SCAnalyzer.Analyzer
var SCAnalyzer = lint.InitializeAnalyzer(&lint.Analyzer{
	Analyzer: &analysis.Analyzer{
		Name:     "S1007",
		Run:      run,
		Requires: []*analysis.Analyzer{inspect.Analyzer, generated.Analyzer},
	},
	Doc: &lint.RawDocumentation{
		Title: `Simplify regular expression by using raw string literal`,
		Text:  "" /* 286 byte string literal not displayed */,

		Before:  `regexp.Compile("\\A(\\w+) profile: total \\d+\\n\\z")`,
		After:   "regexp.Compile(`\\A(\\w+) profile: total \\d+\\n\\z`)",
		Since:   "2017.1",
		MergeIf: lint.MergeIfAny,
	},
})

Source Files

s1007.go

Version
v0.6.0
Published
Feb 11, 2025
Platform
windows/amd64
Imports
11 packages
Last checked
4 minutes ago

Tools for package owners.