ionide-vscode-fsharp
ionide-vscode-fsharp copied to clipboard
linting doesn't work
Describe the bug
linting doesn't work
Steps to reproduce
dotnet new console -lang F# put this as Program.fs
open System
[<EntryPoint>]
let main argv =
let hello_world = "Hello world"
printfn "%s from F#!" hello_world
0 // return an integer exit code
Link to sample reproduction
Expected behaviour
ionide highlights hello_world as an issue
Screenshots
Machine info
- OS: Windows
- .NET SDK version:
8.0.403 - Ionide version:
7.25.2
Additional context
Why do you think hello_world should be a linting error? Are there other tools that signal it that Ionide isn't showing?
Because it works from CLI
As per (https://raw.githubusercontent.com/fsprojects/FSharpLint/refs/heads/master/src/FSharpLint.Core/fsharplint.json)[https://raw.githubusercontent.com/fsprojects/FSharpLint/refs/heads/master/src/FSharpLint.Core/fsharplint.json]
"publicValuesNames": {
"enabled": true,
"config": {
"underscores": "AllowPrefix"
}
},
hello_world should not contain underscores
Ah - it looks like we've disabled that feature due to API incompatibilities with FSharp.Core/FSharp.Compiler.Services. This is a problem we have with many components (including the Analyzer SDK!) so we'd need FSharpLint to update to the 9.0.200 versions before we could re-enable it.
That explains it, thank you for answering!
Thanks for raising this - I had actually forgotten! It's good for us to have tracking for the currently-disabled features/etc.
https://github.com/ionide/FsAutoComplete/issues/942#issuecomment-1973585432 is the last update on the subject
Unfortunately, fsharplint development seems to have stalled again before the PR to create a client for it was merged :-(
Maybe it's still possible to get some info into the UI by doing https://fsprojects.github.io/FSharpLint/how-tos/msbuild-task.html (I haven't tried it lately)
Just a reminder here, as it seems like FSharpLint has migrated to net9.0 about 1 month ago.
Ref: https://github.com/fsprojects/FSharpLint/blob/ef77d8d9f3e468d7a887851572fbcd88fd3e7414/src/FSharpLint.Console/FSharpLint.Console.fsproj
It was updated to FCS 43.9.201 which is more more up to date than it was but still a version behind here. It might still be best to try ro complete https://github.com/fsprojects/FSharpLint/pull/637 so there's less chance of it breaking again when Ionide gets updated to .NET 10