-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #225 from 1eyewonder/using-fake-docs
Update Getting Started Docs: Calling Analyzers w/ FAKE
- Loading branch information
Showing
12 changed files
with
175 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
(** | ||
--- | ||
category: end-users | ||
categoryindex: 1 | ||
index: 5 | ||
categoryindex: 2 | ||
index: 4 | ||
--- | ||
# Unit testing an analyzer | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
category: getting-started | ||
categoryindex: 1 | ||
index: 3 | ||
--- | ||
|
||
# Command Line Arguments | ||
|
||
## Example Command | ||
|
||
When running the CLI tool from the command line (and after installing analyzers), the minimum console arguments you need to provide is the path to the project file(s) you want to analyze. | ||
|
||
```shell | ||
dotnet fsharp-analyzers --project ./YourProject.fsproj --analyzers-path ./path/to/analyzers/directory | ||
``` | ||
|
||
⚠️ If you don't provide the `--analyzers-path` argument, it will default to `packages/analyzers`. If you are using Paket with a group called `analyzers`, this default path should work for you. | ||
|
||
## Viewing Additional Commands | ||
|
||
You can view the full list of commands available by running: | ||
|
||
```shell | ||
dotnet fsharp-analyzers --help | ||
``` | ||
|
||
[Next]({{fsdocs-next-page-link}}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
category: getting-started | ||
categoryindex: 1 | ||
index: 2 | ||
--- | ||
|
||
# Configuring for the IDE | ||
|
||
## Visual Studio Code | ||
|
||
In order to configure analyzers for VSCode, you will need to update your project's `.vscode/settings.json` file or your user settings. You should need the settings shown below. | ||
|
||
```json | ||
{ | ||
"FSharp.enableAnalyzers": true, | ||
"FSharp.analyzersPath": ["path/to/analyzers/directory"] | ||
} | ||
``` | ||
|
||
📓 Note: Issue created [here](https://github.com/ionide/FsAutoComplete/issues/1350) regarding analyzers & SDK mismatches in the logs | ||
|
||
After saving your new settings, make sure to restart VSCode. Once VSCode restarts, you should be able to test and see if the analyzers are working by opening a F# file in your workspace and entering the following code | ||
|
||
 | ||
|
||
[Next]({{fsdocs-next-page-link}}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
category: getting-started | ||
categoryindex: 1 | ||
index: 1 | ||
--- | ||
# Installation | ||
|
||
## Installing the Tool | ||
|
||
A dotnet CLI tool, called [fsharp-analyzers](https://github.com/ionide/FSharp.Analyzers.SDK/), is used to run analyzers outside the context of an IDE. Add it to your tool-manifest with: | ||
|
||
```shell | ||
dotnet tool install fsharp-analyzers --create-manifest-if-needed | ||
``` | ||
|
||
## Installing Analyzers | ||
|
||
### Suggested Packages | ||
|
||
1. [Ionide Analyzers](https://github.com/ionide/FSharp.Analyzers.SDK/) | ||
2. [G-Research Analyzers](https://github.com/G-Research/fsharp-analyzers/) | ||
|
||
### Nuget | ||
|
||
If you are using Nuget as your package manager, add the `PackageReference` pointing to your favorite analyzers to the `.fsproj` file of the project you want to analyze. | ||
|
||
```xml | ||
<PackageReference Include="G-Research.FSharp.Analyzers" Version="0.12.1"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>analyzers</IncludeAssets> | ||
</PackageReference> | ||
<PackageReference Include="Ionide.Analyzers" Version="0.28.0"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>analyzers</IncludeAssets> | ||
</PackageReference> | ||
``` | ||
|
||
### Paket | ||
|
||
If you are using Paket as your package manager, add the package to your `paket.dependencies` file. The example below uses a paket group, but it is not required. | ||
|
||
```paket | ||
group analyzers | ||
source https://api.nuget.org/v3/index.json | ||
nuget Ionide.Analyzers | ||
nuget G-Research.FSharp.Analyzers | ||
``` | ||
|
||
[Next]({{fsdocs-next-page-link}}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.