fix(sheets): silence nilerr/copyloopvar lint in batch type-check additions

- flag_view.go: annotate the fail-open return in validateRawTypes with
  //nolint:nilerr (matches the repo convention for intentional fail-open).
- execute_paths_test.go: drop the redundant tc := tc copy (Go 1.22+ scopes
  the loop var per iteration).
This commit is contained in:
zhengzhijie
2026-06-03 14:33:19 +08:00
parent 27c6333620
commit 2132472b87
2 changed files with 1 additions and 2 deletions

View File

@@ -401,7 +401,6 @@ func TestExecute_WorkbookCreate_EmptyArraysSkipFill(t *testing.T) {
{"empty values", "--values", "[]"},
{"empty headers", "--headers", "[]"},
} {
tc := tc
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
create := &httpmock.Stub{

View File

@@ -272,7 +272,7 @@ func (m mapFlagView) validateRawTypes() error {
}
defs, err := loadFlagDefs()
if err != nil {
return nil
return nil //nolint:nilerr // fail-open: if flag-defs can't load, skip type validation rather than block the batch
}
spec, ok := defs[m.command]
if !ok {