Skip to content

Krzysztof-Cieslak/AnalyzersShowcase

Repository files navigation

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.

About

This repo shows how to use F# Analyzer in your F# project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages