Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAnalyzer ¶ added in v0.1.0
NewAnalyzer creates a new whitespace analyzer.
Types ¶
type Message ¶
type Message struct { // Diagnostic is what position the diagnostic should be put at. This isn't // always the same as the fix start, f.ex. when we fix trailing newlines we // put the diagnostic at the right bracket but we fix between the end of the // last statement and the bracket. Diagnostic token.Pos // FixStart is the span start of the fix. FixStart token.Pos // FixEnd is the span end of the fix. FixEnd token.Pos // LineNumbers represent the actual line numbers in the file. This is set // when finding the diagnostic to make it easier to suggest fixes in // golangci-lint. LineNumbers []int // MessageType represents the type of message it is. MessageType MessageType // Message is the diagnostic to show. Message string }
Message contains a message and diagnostic information.
type MessageType ¶ added in v0.0.3
type MessageType uint8
MessageType describes what should happen to fix the warning.
const ( MessageTypeRemove MessageType = iota + 1 MessageTypeAdd )
List of MessageTypes.
type RunningMode ¶ added in v0.1.0
type RunningMode uint8
RunningMode describes the mode the linter is run in. This can be either native or golangci-lint.
const ( RunningModeNative RunningMode = iota RunningModeGolangCI )
type Settings ¶ added in v0.0.3
type Settings struct { Mode RunningMode MultiIf bool MultiFunc bool }
Settings contains settings for edge-cases.
Click to show internal directories.
Click to hide internal directories.