Skip to content

Tolerate warning 524 when validating formatted output - #3480

Merged
nojaf merged 1 commit into
fsprojects:mainfrom
nojaf:fix-3478
Sep 21, 2026
Merged

nojaf merged 1 commit into
fsprojects:mainfrom
nojaf:fix-3478

Conversation

@nojaf

@nojaf nojaf commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

A use binding at the top level of a script makes the parser warn that it is treated as let (FS0524). The check Fantomas runs over its own output rejects any warning outside its allowlist, so such a script was formatted and then thrown away as invalid.

The warning describes the source as the author wrote it, not anything the formatter changed, so it joins the warnings the check ignores.

Closes #3478

A `use` binding at the top level of a script makes the parser warn
that it is treated as `let` (FS0524). The check Fantomas runs over its
own output rejects any warning outside its allowlist, so such a script
was formatted and then thrown away as invalid.

The warning describes the source as the author wrote it, not anything
the formatter changed, so it joins the warnings the check ignores.

Closes fsprojects#3478
@nojaf
nojaf merged commit 02e7efc into fsprojects:main Sep 21, 2026
20 checks passed
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.

Fantomas 8 with use bindings in fsx-file

1 participant