(value any)
| 338 | } |
| 339 | |
| 340 | func parseOverrideOptions(value any) OverrideOptions { |
| 341 | result := OverrideOptions{} |
| 342 | optionsMap, ok := asStringAnyMap(value) |
| 343 | if !ok { |
| 344 | return result |
| 345 | } |
| 346 | |
| 347 | if value, exists := optionsMap("diagnosticSeverity"); exists { |
| 348 | result.DiagnosticSeverity = parseDiagnosticSeverityMap(value) |
| 349 | } |
| 350 | |
| 351 | if value, exists := optionsMap("pipeableMinArgCount"); exists { |
| 352 | if f, ok := value.(float64); ok { |
| 353 | parsed := int(f) |
| 354 | result.PipeableMinArgCount = &parsed |
| 355 | } |
| 356 | } |
| 357 | if value, exists := optionsMap("keyPatterns"); exists { |
| 358 | if arr, ok := value.([]any); ok { |
| 359 | parsed := parseKeyPatterns(arr) |
| 360 | result.KeyPatterns = &parsed |
| 361 | } |
| 362 | } |
| 363 | if value, exists := optionsMap("extendedKeyDetection"); exists { |
| 364 | if b, ok := value.(bool); ok { |
| 365 | result.ExtendedKeyDetection = &b |
| 366 | } |
| 367 | } |
| 368 | if value, exists := optionsMap("allowedDuplicatedPackages"); exists { |
| 369 | if pkgs, ok := parseStringArrayStrict(value); ok { |
| 370 | result.AllowedDuplicatedPackages = &pkgs |
| 371 | } |
| 372 | } |
| 373 | if value, exists := optionsMap("effectFn"); exists { |
| 374 | if variants, ok := parseStringArrayStrict(value); ok { |
| 375 | result.EffectFn = &variants |
| 376 | } |
| 377 | } |
| 378 | |
| 379 | return result |
| 380 | } |
| 381 | |
| 382 | func parseStringArrayStrict(value any) ([]string, bool) { |
| 383 | arr, ok := value.([]any) |
no test coverage detected