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

package s1002

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

Index

Variables

var Analyzer = SCAnalyzer.Analyzer
var SCAnalyzer = lint.InitializeAnalyzer(&lint.Analyzer{
	Analyzer: &analysis.Analyzer{
		Name:     "S1002",
		Run:      run,
		Requires: []*analysis.Analyzer{inspect.Analyzer, generated.Analyzer},
	},
	Doc: &lint.RawDocumentation{
		Title:  `Omit comparison with boolean constant`,
		Before: `if x == true {}`,
		After:  `if x {}`,
		Since:  "2017.1",

		MergeIf: lint.MergeIfAll,
	},
})

Source Files

s1002.go

Version
v0.6.1 (latest)
Published
Mar 5, 2025
Platform
js/wasm
Imports
13 packages
Last checked
3 hours ago

Tools for package owners.