pragma

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Content       string
	CommentPrefix []string
	Pragmas       map[int]*Pragma
}

func NewFile

func NewFile(content string, commentPrefix []string) *File

type Issue

type Issue struct {
	Column  int
	Message string

	// Hit is used internally by the diff tool to check for issues that were not hit.
	Hit bool
}

type Pragma

type Pragma struct {
	Issues map[string][]*Issue
	Hit    map[string]bool
}

Pragma is of the form [IssueCode]: Column "Message", Column "Message"; [AnotherIssueCode]: ...

func ParsePragma

func ParsePragma(comment string) *Pragma

ParsePragma expects a pragma comment (without the comment prefix like // or #) and returns a structured Pragma.

Jump to

Keyboard shortcuts

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