autodisable

package
v0.50.4 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PlacementStrategy

type PlacementStrategy interface {
	Disable(offset int, comments []*parser.Comment, inline *parser.Comment)
	Finalize() error
}

PlacementStrategy is an abstraction to put a comment.

func NewPlacementStrategy

func NewPlacementStrategy(ptype PlacementType, filename, ruleID string) (PlacementStrategy, error)

NewPlacementStrategy creates a strategy object.

type PlacementType

type PlacementType int

PlacementType is a selection of the placement strategies.

const (
	// Noop does nothing
	Noop PlacementType = iota
	// ThisThenNext puts inline comments.
	ThisThenNext
	// Next puts newline comments.
	Next
)

Jump to

Keyboard shortcuts

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