chore: use postfix array syntax to satisfy PostfixGenericsAnalyzer#4657
Open
dbrattli wants to merge 1 commit into
Open
chore: use postfix array syntax to satisfy PostfixGenericsAnalyzer#4657dbrattli wants to merge 1 commit into
dbrattli wants to merge 1 commit into
Conversation
Resolve all 52 open code-scanning alerts of type "Detect if generic type should be in the postfix position" (Ionide.Analyzers PostfixGenericsAnalyzer, IONIDE-002). Convert prefix/bracket generic type annotations to the word-postfix form the analyzer expects: - `Foo[]` -> `Foo array` - `ref<Regex>` -> `Regex ref` These are purely syntactic changes to type annotations; the compiled types are identical, so there is no behavioral or API change (including the single `Fable.AST` annotation). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
dbrattli
commented
Jun 13, 2026
| | NewTuple of values: Expr list * isStruct: bool | ||
| | NewRecord of values: Expr list * ref: EntityRef * genArgs: Type list | ||
| | NewAnonymousRecord of values: Expr list * fieldNames: string[] * genArgs: Type list * isStruct: bool | ||
| | NewAnonymousRecord of values: Expr list * fieldNames: string array * genArgs: Type list * isStruct: bool |
Collaborator
Author
There was a problem hiding this comment.
This should be safe right @MangelMaxime ? It will not be a breaking change for Fable.AST?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves all 52 open code-scanning alerts of type "Detect if generic type should be in the postfix position" — emitted by
Ionide.Analyzers'PostfixGenericsAnalyzer(ruleIONIDE-002).The analyzer wants generic collection/cell types written in word-postfix form. This PR converts every flagged annotation:
Foo[]Foo arrayref<Regex>Regex ref51 of the 52 alerts were the
Foo[]bracket form; one was theref<Regex>prefix form (Globbing.fs).Notes
src/Fable.AST/Fable.fs(string[]→string array). AlthoughAGENTS.mdflagsFable.ASTas off-limits because changes there are usually breaking, this one is not:string[]andstring arrayare the same type. Happy to revert that one line and dismiss the alert instead if preferred.[]usages were touched.Verification
dotnet build src/Fable.Cli(transitively coversFable.AST,Fable.Compiler, and all ofFable.Transforms): succeeds, 0 warnings, 0 errors.🤖 Generated with Claude Code