Help us shape the future of Go! Take the 2026 Go Developer Survey

whitespace

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: MIT Imports: 5 Imported by: 19

README

Whitespace linter

Whitespace is a linter that checks for unnecessary newlines at the start and end of functions, if, for, etc.

Installation guide

To install as a standalone linter, run go install github.com/ultraware/whitespace/cmd/whitespace@latest.

Whitespace is also included in golangci-lint. Install it and enable whitespace.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAnalyzer added in v0.1.0

func NewAnalyzer(settings *Settings) *analysis.Analyzer

NewAnalyzer creates a new whitespace analyzer.

func Run

func Run(pass *analysis.Pass, settings *Settings)

Types

type Settings added in v0.0.3

type Settings struct {
	MultiIf   bool
	MultiFunc bool
}

Settings contains settings for edge-cases.

Directories

Path Synopsis
cmd
whitespace command

Jump to

Keyboard shortcuts

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