Skip to content
Myr

ci: fix lint

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Andrey Nering · committed by Andrey Nering · parent 5adfa5b · Browse files · 6 files+9 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

6 files+9 added−7 removed

  • other:+9 added−7 removed

6 files+9 added−7 removed

modified:choose/command.go+1 added-1 removed
37 unmodified lines
3839 // normalize options into a map40 options := map[string]string{}41 // keep the labels in the user-provided order42 var labels []string //nolint:prealloc42 var labels []string43 for _, opt := range o.Options {44 if o.LabelDelimiter == "" {45 options[opt] = opt46 continue
136 unmodified lines
modified:completion/zsh.go+4 added-4 removed
31 unmodified lines
32 var str strings.Builder33 str.WriteString(" ")34 if f.Short != 0 {35 str.WriteString("'(")36 str.WriteString(fmt.Sprintf("-%c --%s", f.Short, f.Name))36 fmt.Fprintf(&str, "-%c --%s", f.Short, f.Name)37 if !f.IsBool() {38 str.WriteString("=")39 }40 str.WriteString(")'")41 str.WriteString("{")42 str.WriteString(fmt.Sprintf("-%c,--%s", f.Short, f.Name))42 fmt.Fprintf(&str, "-%c,--%s", f.Short, f.Name)43 if !f.IsBool() {44 str.WriteString("=")45 }46 str.WriteString("}")47 str.WriteString("\"")48 } else {49 str.WriteString("\"")50 str.WriteString(fmt.Sprintf("--%s", f.Name))50 fmt.Fprintf(&str, "--%s", f.Name)51 if !f.IsBool() {52 str.WriteString("=")53 }54 }55 str.WriteString(fmt.Sprintf("[%s]", f.Help))55 fmt.Fprintf(&str, "[%s]", f.Help)56 if !f.IsBool() {57 str.WriteString(":")58 str.WriteString(strings.ToLower(f.Help))59 str.WriteString(":")
87 unmodified lines
modified:filter/command.go+1 added-1 removed
164 unmodified lines
165 return nil166}167168func (o Options) checkSelected(m model) {169 out := []string{}169 out := make([]string, 0, len(m.selected))170 for k := range m.selected {171 out = append(out, k)172 }173 tty.Println(strings.Join(out, o.OutputDelimiter))
1 unmodified line
modified:filter/filter.go+1 added-1 removed
487 unmodified lines
488 matchedString := strings.ToLower(choice)489490 index := strings.Index(matchedString, search)491 if index >= 0 {492 matchedIndexes := []int{}492 matchedIndexes := make([]int, 0, len(search))493 for s := range search {494 matchedIndexes = append(matchedIndexes, index+s)495 }496 matches = append(matches, fuzzy.Match{
53 unmodified lines
modified:format/formats.go+1 added
1//nolint2package format34import (5 "bytes"
62 unmodified lines
modified:format/options.go+1 added
1//nolint2package format34// Options is customization options for the format command.5type Options struct {
8 unmodified lines