Skip to content

Commit f4b4d96

Browse files
authored
Merge pull request #260 from 1eyewonder/block-comment-ignore-fix
Update ignore parser to not include `*)` from block comments
2 parents adb1ec0 + 17b3ee0 commit f4b4d96

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/FSharp.Analyzers.SDK/FSharp.Analyzers.SDK.fs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,17 @@ module Ignore =
5959

6060
let tryGetIgnoreComment splitBy (sourceText: ISourceText) (ct: CommentTrivia) =
6161
match ct with
62-
| CommentTrivia.BlockComment r
62+
| CommentTrivia.BlockComment _ -> None
6363
| CommentTrivia.LineComment r ->
64-
// pattern to match is:
65-
// prefix: command [codes]
66-
match
64+
let commentText =
6765
sourceText.GetLineString(
6866
r.StartLine
6967
- 1
7068
)
71-
with
69+
70+
// pattern to match is:
71+
// prefix: command [codes]
72+
match commentText with
7273
| ParseRegexCompiled @"fsharpanalyzer:\signore-line-next\s(.*)$" [ SplitBy splitBy codes ] ->
7374
Some
7475
<| IgnoreComment.NextLine(r.StartLine, trimCodes codes)

0 commit comments

Comments
 (0)