Skip to content

Commit 3b3601f

Browse files
committed
chore: fix golangci
Signed-off-by: Joseph Kato <joseph@jdkato.io>
1 parent fa12173 commit 3b3601f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

internal/core/view.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ func (b *View) Apply(f *File) ([]ScopedValues, error) {
125125

126126
if selectResults, ok := selected.([]any); ok {
127127
if len(selectResults) == 1 {
128-
if inner, ok := selectResults[0].([]any); ok {
128+
if inner, iok := selectResults[0].([]any); iok {
129129
selectResults = inner
130130
}
131131
} else {
@@ -134,7 +134,7 @@ func (b *View) Apply(f *File) ([]ScopedValues, error) {
134134

135135
values := []string{}
136136
for _, v := range selectResults {
137-
if str, ok := v.(string); ok {
137+
if str, sok := v.(string); sok {
138138
values = append(values, str)
139139
}
140140
}

internal/lint/data.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func (l *Linter) lintScopedValues(f *core.File, values []core.ScopedValues) erro
7878
padding = strings.Index(line, firstLine)
7979
if padding < 0 {
8080
// block scalar case - use indentation of matched line
81-
i -= 1
81+
i-- // adjust for 1-based line numbers
8282
padding = strings.Index(line, strings.TrimSpace(line))
8383
}
8484
}

0 commit comments

Comments
 (0)