Documentation ¶
Overview ¶
Package utils contains shared methods that can be used by different implementations of buildifier binary
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandDirectories ¶
ExpandDirectories takes a list of file/directory names and returns a list with file names by traversing each directory recursively and searching for relevant Starlark files.
Types ¶
type Diagnostics ¶
type Diagnostics struct { Success bool `json:"success"` // overall success (whether all files are formatted properly and have no warnings) Files []*FileDiagnostics `json:"files"` // diagnostics per file }
Diagnostics contains diagnostic information returned by formatter and linter
func NewDiagnostics ¶
func NewDiagnostics(fileDiagnostics ...*FileDiagnostics) *Diagnostics
NewDiagnostics returns a new Diagnostics object
type FileDiagnostics ¶
type FileDiagnostics struct { Filename string `json:"filename"` Formatted bool `json:"formatted"` Valid bool `json:"valid"` Warnings []*warning `json:"warnings"` }
FileDiagnostics contains diagnostics information for a file
func InvalidFileDiagnostics ¶
func InvalidFileDiagnostics(filename string) *FileDiagnostics
InvalidFileDiagnostics returns a new FileDiagnostics object for an invalid file
func NewFileDiagnostics ¶
func NewFileDiagnostics(filename string, warnings []*warn.Finding) *FileDiagnostics
NewFileDiagnostics returns a new FileDiagnostics object
Click to show internal directories.
Click to hide internal directories.