Skip to content

Commit 5951e06

Browse files
authored
fix: lint issues, linter config (#505)
1 parent 491042b commit 5951e06

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

.golangci-soft.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ linters:
2323
- gomnd
2424
- gomoddirectives
2525
- goprintffuncname
26-
- ifshort
26+
# - ifshort
2727
# - lll
2828
- misspell
2929
- nakedret
@@ -43,5 +43,4 @@ linters:
4343
- staticcheck
4444
- structcheck
4545
- typecheck
46-
- unused
4746
- varcheck

table/command.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func (o Options) Run() error {
5656
if err != nil {
5757
return fmt.Errorf("invalid data provided")
5858
}
59-
var columns = make([]table.Column, 0, len(columnNames))
59+
columns := make([]table.Column, 0, len(columnNames))
6060

6161
for i, title := range columnNames {
6262
width := lipgloss.Width(title)
@@ -77,7 +77,7 @@ func (o Options) Run() error {
7777
Selected: o.SelectedStyle.ToLipgloss(),
7878
}
7979

80-
var rows = make([]table.Row, 0, len(data))
80+
rows := make([]table.Row, 0, len(data))
8181
for _, row := range data {
8282
if len(row) > len(columns) {
8383
return fmt.Errorf("invalid number of columns")
@@ -91,7 +91,7 @@ func (o Options) Run() error {
9191
Rows(data...).
9292
BorderStyle(o.BorderStyle.ToLipgloss()).
9393
Border(style.Border[o.Border]).
94-
StyleFunc(func(row, col int) lipgloss.Style {
94+
StyleFunc(func(row, _ int) lipgloss.Style {
9595
if row == 0 {
9696
return styles.Header
9797
}
@@ -111,7 +111,6 @@ func (o Options) Run() error {
111111
)
112112

113113
tm, err := tea.NewProgram(model{table: table}, tea.WithOutput(os.Stderr)).Run()
114-
115114
if err != nil {
116115
return fmt.Errorf("failed to start tea program: %w", err)
117116
}

0 commit comments

Comments
 (0)