Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linting doesn't work #2068

Open
inwenis opened this issue Feb 25, 2025 · 7 comments
Open

linting doesn't work #2068

inwenis opened this issue Feb 25, 2025 · 7 comments
Labels
FSharpLint Problems related to FSharpLint

Comments

@inwenis
Copy link

inwenis commented Feb 25, 2025

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

Image

Machine info

  • OS: Windows
  • .NET SDK version: 8.0.403
  • Ionide version: 7.25.2

Additional context

@baronfel
Copy link
Contributor

Why do you think hello_world should be a linting error? Are there other tools that signal it that Ionide isn't showing?

@inwenis
Copy link
Author

inwenis commented Feb 25, 2025

Because it works from CLI

Image

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

@baronfel
Copy link
Contributor

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.

@inwenis
Copy link
Author

inwenis commented Feb 25, 2025

That explains it, thank you for answering!

@baronfel
Copy link
Contributor

Thanks for raising this - I had actually forgotten! It's good for us to have tracking for the currently-disabled features/etc.

@TheAngryByrd
Copy link
Member

ionide/FsAutoComplete#942 (comment) is the last update on the subject

@Numpsy
Copy link
Contributor

Numpsy commented Mar 7, 2025

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)

@TheAngryByrd TheAngryByrd added the FSharpLint Problems related to FSharpLint label Mar 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FSharpLint Problems related to FSharpLint
Projects
None yet
Development

No branches or pull requests

4 participants