Domanda

Is there a tool that detects unused code in F# programs?

Tools for F# have been discussed from time to time, but it has been a while since this question:

Are there any support tools like coderush or resharper for F#?

È stato utile?

Soluzione

I don't know of any tool that performs dead code analysis for F# right now.

That said, the recently-released FSharp.Compiler.Service project certainly makes implementing such tools easier now.

A while back, one or two of the JetBrains developers experimented with a ReSharper language service for F#, but I don't think they ever got to the point where it was usable in production. Maybe now that FSharp.Compiler.Service is available, perhaps work can start up again. If you want to see their work: https://github.com/JetBrains/FSharper

Altri suggerimenti

Use the following project settings:

Visual Studio > Solution >
    Project > Build > General > Other flags > --warnon:1182

This will warn on unused functions and values when code gets compiled.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top