FSharpLint is a style checking tool for F#. It points out locations where a set of rules on how F# is to be styled have been broken. The tool is configurable via JSON and can be run from a console app, or as an MSBuild task. It also provides an interface to easily integrate the tool into other software.
The project aims to let the user know of problems through matching user defined hints a la HLint, and also by using custom rules written in F# similar to the rules in Mascot and StyleCop.
The tool in use (running as an MSBuild task with TreatWarningsAsErrors set to true):
Usage
FSharpLint can be used in several ways:
- Running as dotnet tool from command line.
- In VS Code using the Ionide-FSharp plugin.
- In Visual Studio using the F# Lint extension.
- As an MSBuild Task.
- In other editors through FsAutoComplete Language Server
Documentation
The docs contains an overview of the tool and how to use it, including a list of the available rules for linting.
Nuget Packages
Package | Version |
---|---|
dotnet tool | |
API |
How to build application
- Make sure you've installed .Net Core version defined in global.json
- Run
dotnet tool restore
to install all developer tools required to build the project - Run
dotnet fake build
to build default target of build script - To run tests use
dotnet fake build -t Test
- To build documentation use
dotnet fake build -t Docs
How to work with documentation
- Make sure you've installed .Net Core version defined in global.json
- Run
dotnet tool restore
to install all developer tools required to build the project - Run
dotnet fake build
to build default target of build script - Build documentation to make sure everything is fine with
dotnet fake build -t Docs
- Go to docs folder
cd docs
and start Fornax in watch modedotnet fornax watch
- Your documentation should be now accessible on
localhost:8080
and will be regenerated on every file save
How to release
- Update CHANGELOG.md by adding new entry (
## [X.Y.Z]
) and commit it. - Create version tag (
git tag vX.Y.Z
) - Push the tag to the repo
git push origin vX.Y.Z
- this will start CI process that will create a GitHub release and publish the packages to NuGet
How to contribute
Bug reports, feature requests, and pull requests are very welcome! Please read the Contribution Guidelines to get started.
Licensing
The project is licensed under MIT. For more information on the license see the LICENSE file.
Maintainer(s)
The default maintainer account for projects under "fsprojects" is @fsprojectsgit - F# Community Project Incubation Space (repo management)