Skip to content
This repo shows how to use F# Analyzer in your F# project
F#
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
img
.gitignore
AnalyzersTest.fsproj
LICENSE.md
Program.fs
README.md
paket.dependencies
paket.lock

README.md

Sample for using F# Analyzers in the project

This repo shows how to use F# Analyzer in your F# project. I'm using sample analyzer I've published - FSharp.Analyzers.Sample that is warning about any usage of Option.Value call

How to run analyzer in this project

  1. Restore packages with paket restore
  2. Install fsharp-analyzers tool as global .Net tool - dotnet tool install fsharp-analyzers -g
  3. Run tool with --project argument - fsharp-analyzers --project .\AnalyzersTest.fsproj --verbose

How to use in editor

  1. Requires Ionide 4.4.0
  2. Open VSCode
  3. Go to settings and set FSharp.enableAnalyzers to true
  4. Reload window

How to add F# Analyzer to your project

  1. Using Paket add analyzer to the analyzers group (don't set storage: none - we want to install it locally)
  2. Run paket install
  3. Install fsharp-analyzers tool as global .Net tool - dotnet tool install fsharp-analyzers -g
  4. Run tool with --project argument - fsharp-analyzers --project PATH_TO_YOUR_FSPROJ --verbose

Learn more about F# Analyzers

Contributing and copyright

The project is hosted on GitHub where you can report issues, fork the project and submit pull requests.

The library is available under MIT license, which allows modification and redistribution for both commercial and non-commercial purposes.

You can’t perform that action at this time.