Skip to content

Commit b38d589

Browse files
committed
Fix CodeQL warnings
1 parent 53916e3 commit b38d589

File tree

5 files changed

+277
-290
lines changed

5 files changed

+277
-290
lines changed

example/opts/options.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@ func (m *Machine) Complete(ctx carapace.Context) carapace.Action {
4141
}
4242
}
4343

44-
func (p *Machine) String() string {
45-
return string(*p)
44+
func (m *Machine) String() string {
45+
return string(*m)
4646
}
4747

48-
func (p *Machine) Set(value string) error {
49-
*p = (Machine)(value)
48+
func (m *Machine) Set(value string) error {
49+
*m = (Machine)(value)
5050

5151
return nil
5252
}
5353

54-
func (p *Machine) Type() string {
55-
return reflect.TypeOf(*p).Kind().String()
54+
func (m *Machine) Type() string {
55+
return reflect.TypeOf(*m).Kind().String()
5656
}

internal/completions/completion.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ func GetCombinedCompletionAction(val reflect.Value, tag parser.Tag, opts *parser
3939
return nil, isRepeatable, false
4040
}
4141

42+
// ChoiceCompletions produces a completer proposing the tagged choices for a flag/arg.
4243
func ChoiceCompletions(tag parser.Tag, val reflect.Value) carapace.CompletionCallback {
4344
choices := tag.GetMany("choice")
4445

0 commit comments

Comments
 (0)