diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index fe20752..b2a1cba 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -15,7 +15,7 @@ ] }, "fsdocs-tool": { - "version": "20.0.0-alpha-008", + "version": "20.0.0-alpha-009", "commands": [ "fsdocs" ] diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..e3ca87a --- /dev/null +++ b/.gitattributes @@ -0,0 +1,7 @@ +# Automatically normalize line endings +* text=auto + +# Always use lf for F# files +*.fs text eol=lf +*.fsx text eol=lf +*.fsi text eol=lf \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b868e2..a411391 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 0.3.0 - 2023-11-13 + +### Changed +* Update FSharp.Analyzers.SDK to v0.20.0. [#26](https://github.com/ionide/ionide-analyzers/pull/26) + ## 0.2.0 - 2023-11-09 ### Fixed diff --git a/Directory.Build.props b/Directory.Build.props index 5aefb17..1d0a479 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -14,6 +14,7 @@ F#, fsharp, analyzers true true + https://github.com/ionide/ionide-analyzers embedded MIT README.md diff --git a/Directory.Packages.props b/Directory.Packages.props index 632d2a5..cd00a35 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -12,7 +12,7 @@ - - + + \ No newline at end of file diff --git a/tests/Ionide.Analyzers.Tests/Style/SquareBracketArrayAnalyzerTests.fs b/tests/Ionide.Analyzers.Tests/Style/SquareBracketArrayAnalyzerTests.fs index 0b82bb0..7c9bdea 100644 --- a/tests/Ionide.Analyzers.Tests/Style/SquareBracketArrayAnalyzerTests.fs +++ b/tests/Ionide.Analyzers.Tests/Style/SquareBracketArrayAnalyzerTests.fs @@ -30,3 +30,19 @@ let a (b: string[]) = () Assert.IsNotEmpty msgs Assert.IsTrue(Assert.messageContains "Prefer postfix syntax for arrays." msgs[0]) } + +[] +let ``int array in val sig`` () = + async { + let source = + """ +module M + +val a: b: int[] -> unit + """ + + let ctx = getContextForSignature projectOptions source + let! msgs = squareBracketArrayAnalyzer ctx + Assert.IsNotEmpty msgs + Assert.IsTrue(Assert.messageContains "Prefer postfix syntax for arrays." msgs[0]) + }