mirror of
https://github.com/larksuite/cli.git
synced 2026-07-03 14:02:43 +08:00
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:
@@ -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{
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user