Skip to content

[All] Fix ~28 code scanning warnings (batch 2)#4371

Merged
dbrattli merged 2 commits intomainfrom
dbrattli/fable-warnings-2
Mar 2, 2026
Merged

[All] Fix ~28 code scanning warnings (batch 2)#4371
dbrattli merged 2 commits intomainfrom
dbrattli/fable-warnings-2

Conversation

@dbrattli
Copy link
Collaborator

@dbrattli dbrattli commented Feb 28, 2026

Summary

  • Follow-up to [All] Fix ~45 code scanning warnings in Fable.Transforms #4357 addressing four additional categories of Ionide analyzer warnings across Fable.Transforms and Fable.Compiler
  • IONIDE-002: Prefer postfix type syntax for seq, option only (per F# style guide — ResizeArray and other types keep prefix form)
  • IONIDE-005: Use String.IsNullOrEmpty instead of = "" pattern matches
  • IONIDE-007: Use list pattern instead of cons (Recursive :: [][ Recursive ])
  • IONIDE-010: Combine List.filter |> List.map into List.choose, merge consecutive List.map |> List.map into single List.map

All changes are mechanical and do not affect runtime behavior. Both Fable.Transforms and Fable.Compiler build with 0 warnings, 0 errors.

Test plan

  • dotnet build src/Fable.Transforms/Fable.Transforms.fsproj — passes
  • dotnet build src/Fable.Compiler/Fable.Compiler.fsproj — passes
  • CI: ./build.sh test javascript
  • CI: ./build.sh test python

🤖 Generated with Claude Code

Address four categories of Ionide analyzer warnings across
Fable.Transforms and Fable.Compiler without changing runtime behavior:

- IONIDE-002: Prefer postfix type syntax (seq<T> → T seq, etc.)
- IONIDE-005: Use String.IsNullOrEmpty instead of = ""
- IONIDE-007: Use list pattern instead of cons (Recursive :: [] → [Recursive])
- IONIDE-010: Combine filter|>map into choose, merge consecutive maps

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link

Python Type Checking Results (Pyright)

Metric Value
Total errors 18
Files with errors 4
Excluded files 4
New errors ✅ No
Excluded files with errors (4 files)

These files have known type errors and are excluded from CI. Remove from pyrightconfig.ci.json as errors are fixed.

File Errors Status
temp/tests/Python/test_applicative.py 12 Excluded
temp/tests/Python/test_hash_set.py 3 Excluded
temp/tests/Python/test_nested_and_recursive_pattern.py 2 Excluded
temp/tests/Python/fable_modules/thoth_json_python/encode.py 1 Excluded

ResizeArray is not one of the six types (list, option, voption,
array, ref, seq) that should use postfix syntax. Keep prefix form.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dbrattli dbrattli changed the title [All] Fix ~32 code scanning warnings (batch 2) [All] Fix ~28 code scanning warnings (batch 2) Feb 28, 2026
@dbrattli dbrattli merged commit 86faa18 into main Mar 2, 2026
24 checks passed
@dbrattli dbrattli deleted the dbrattli/fable-warnings-2 branch March 2, 2026 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants