diff --git a/.golangci.yml b/.golangci.yml index 90c5c08..7c0a115 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,17 +1,6 @@ +version: "2" run: tests: false - -issues: - include: - - EXC0001 - - EXC0005 - - EXC0011 - - EXC0012 - - EXC0013 - - max-issues-per-linter: 0 - max-same-issues: 0 - linters: enable: - bodyclose @@ -19,8 +8,6 @@ linters: - goconst - godot - godox - - gofumpt - - goimports - gomoddirectives - goprintffuncname - gosec @@ -39,3 +26,24 @@ linters: - unparam - whitespace - wrapcheck + exclusions: + generated: lax + presets: + - common-false-positives + paths: + - third_party$ + - builtin$ + - examples$ +issues: + max-issues-per-linter: 0 + max-same-issues: 0 +formatters: + enable: + - gofumpt + - goimports + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ diff --git a/bubbles.go b/bubbles.go index 9b9e8d4..52af450 100644 --- a/bubbles.go +++ b/bubbles.go @@ -1 +1,4 @@ +// Package bubbles provides some components for Bubble Tea applications. These +// components are used in production in Glow, Charm and many other +// applications. package bubbles diff --git a/filepicker/filepicker.go b/filepicker/filepicker.go index da6af56..b749684 100644 --- a/filepicker/filepicker.go +++ b/filepicker/filepicker.go @@ -1,3 +1,5 @@ +// Package filepicker provides a file picker component for Bubble Tea +// applications. package filepicker import ( diff --git a/help/help.go b/help/help.go index e2cd44a..e97f5f8 100644 --- a/help/help.go +++ b/help/help.go @@ -1,3 +1,4 @@ +// Package help provides a simple help view for Bubble Tea applications. package help import ( diff --git a/list/list.go b/list/list.go index 951a533..9ce24bc 100644 --- a/list/list.go +++ b/list/list.go @@ -284,7 +284,7 @@ func (m *Model) SetFilterText(filter string) { m.updateKeybindings() } -// Helper method for setting the filtering state manually. +// SetFilterState allows setting the filtering state manually. func (m *Model) SetFilterState(state FilterState) { m.Paginator.Page = 0 m.cursor = 0 diff --git a/progress/progress.go b/progress/progress.go index fadc42c..c0bc6a6 100644 --- a/progress/progress.go +++ b/progress/progress.go @@ -1,3 +1,4 @@ +// Package progress provides a simple progress bar for Bubble Tea applications. package progress import ( diff --git a/spinner/spinner.go b/spinner/spinner.go index 3ea915d..2269df7 100644 --- a/spinner/spinner.go +++ b/spinner/spinner.go @@ -1,3 +1,4 @@ +// Package spinner provides a spinner component for Bubble Tea applications. package spinner import ( diff --git a/table/table.go b/table/table.go index edb6f22..13241a1 100644 --- a/table/table.go +++ b/table/table.go @@ -1,3 +1,4 @@ +// Package table provides a simple table component for Bubble Tea applications. package table import ( diff --git a/textarea/textarea.go b/textarea/textarea.go index 4090ba9..26d3eef 100644 --- a/textarea/textarea.go +++ b/textarea/textarea.go @@ -1,3 +1,5 @@ +// Package textarea provides a multi-line text input component for Bubble Tea +// applications. package textarea import ( diff --git a/textinput/textinput.go b/textinput/textinput.go index 848d52b..539c174 100644 --- a/textinput/textinput.go +++ b/textinput/textinput.go @@ -1,3 +1,5 @@ +// Package textinput provides a text input component for Bubble Tea +// applications. package textinput import ( @@ -165,7 +167,7 @@ func New() Model { } } -// SetWidth sets the width of the text input. +// Width returns the width of the text input. func (m Model) Width() int { return m.width } @@ -797,7 +799,7 @@ func (m *Model) MatchedSuggestions() []string { return m.getSuggestions(m.matchedSuggestions) } -// CurrentSuggestion returns the currently selected suggestion index. +// CurrentSuggestionIndex returns the currently selected suggestion index. func (m *Model) CurrentSuggestionIndex() int { return m.currentSuggestionIndex } diff --git a/viewport/keymap.go b/viewport/keymap.go index d9c503a..f8f0ca2 100644 --- a/viewport/keymap.go +++ b/viewport/keymap.go @@ -1,3 +1,5 @@ +// Package viewport provides a component for rendering a viewport in a Bubble +// Tea. package viewport import "github.com/charmbracelet/bubbles/v2/key"