Add missing expr to type annotation - #164
Merged
gnrkr789 merged 1 commit intoJul 3, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses several reported Type Annotation and LSP diagnostic issues by expanding SynType handling for type annotations, removing duplicate diagnostics at the collection layer, and aligning an incorrect LSP line-ending warning message with the existing LineConvention behavior.
Changes:
- Handle
SynType.ParenandSynType.AnoninTypeAnnotationConvention.checkPatto avoid falling through to the “TODO” warning path. - Deduplicate diagnostics in
Diagnostics.reportWarnwhen collecting into aLintContext. - Add regression tests for paren/anon type annotations and for duplicate
:spacing diagnostics; fix the LSP scanWorkspace line-ending message.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/FSLint/TypeAnnotationConvention.fs | Adds missing SynType cases for type annotation checking. |
| src/FSLint/Diagnostics.fs | Adds duplicate-diagnostic suppression when accumulating LintContext.Errors. |
| src/FSLint.Tests/TypeAnnotationTests.fs | Adds tests for paren/anon param types and for diagnostic deduplication. |
| src/FSLint.Tests/Lint.fs | Adds helper to lint and return collected errors for assertions. |
| src/FSLint.LanguageServer/Program.fs | Fixes scanWorkspace line-ending warning message text. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Remove duplicate warns - Fix wrong msg
gnrkr789
force-pushed
the
160-false-negative-for-parenthesized-and-wildcard-param-types
branch
from
July 3, 2026 05:51
79073de to
3f41c0d
Compare
gnrkr789
deleted the
160-false-negative-for-parenthesized-and-wildcard-param-types
branch
July 3, 2026 05:52
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.
Close #160, #161 , #162