Skip to content

Commit ba24710

Browse files
committed
Updated docs. Broke apart getting-started into multiple pages
1 parent 020b964 commit ba24710

File tree

11 files changed

+179
-122
lines changed

11 files changed

+179
-122
lines changed

docs/content/Dual Analyzer.fsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
(**
22
---
33
category: end-users
4-
categoryindex: 1
5-
index: 3
4+
categoryindex: 2
5+
index: 2
66
---
77
88
# Writing an analyzer for both console and editor

docs/content/Getting Started Writing.fsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
(**
22
---
33
category: end-users
4-
categoryindex: 1
5-
index: 2
4+
categoryindex: 2
5+
index: 1
66
---
77
88
# Getting started writing an analyzer

docs/content/Programmatic access.fsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
(**
22
---
33
category: end-users
4-
categoryindex: 1
5-
index: 4
4+
categoryindex: 2
5+
index: 3
66
---
77
88
# Programmatically running an analyzer

docs/content/Running during CI.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
category: end-users
3-
categoryindex: 1
4-
index: 6
3+
categoryindex: 2
4+
index: 5
55
---
66

77
# Running analyzers during continuous integration

docs/content/Unit Testing.fsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
(**
22
---
33
category: end-users
4-
categoryindex: 1
5-
index: 5
4+
categoryindex: 2
5+
index: 4
66
---
77
88
# Unit testing an analyzer
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
category: getting-started
3+
categoryindex: 1
4+
index: 3
5+
---
6+
7+
# Command Line Arguments
8+
9+
## Example Command
10+
11+
When running the CLI tool from the command line, the bare minimum you need to provide is the path to the project file(s) you want to analyze.
12+
13+
```shell
14+
dotnet fsharp-analyzers --project ./YourProject.fsproj
15+
```
16+
17+
An optional argument you may need to provide is `--analyzers-path`. This is the path to the directory containing the analyzer DLLs.
18+
19+
```shell
20+
dotnet fsharp-analyzers --project ./YourProject.fsproj --analyzers-path ./path/to/analyzers/directory
21+
```
22+
23+
⚠️ If you don't provide this argument, it will default to `packages/analyzers`.
24+
25+
## Viewing Additional Commands
26+
27+
You can view the full list of commands available by running:
28+
29+
```shell
30+
dotnet fsharp-analyzers --help
31+
```
32+
33+
[Next]({{fsdocs-next-page-link}})
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
category: getting-started
3+
categoryindex: 1
4+
index: 2
5+
---
6+
7+
# Configuring for the IDE
8+
9+
## Visual Studio Code
10+
11+
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 only need the following settings:
12+
13+
```json
14+
{
15+
"FSharp.enableAnalyzers": true,
16+
"FSharp.analyzersPath": ["packages/analyzers"]
17+
}
18+
```
19+
20+
📓 Note: The path in `FSharp.analyzersPath` above is currently pointing to the path we set up in the Paket example on the [installation page]({{fsdocs-previous-page-link}}).
21+
22+
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
23+
24+
![Analyzers Inline Warning](../../images/analyzers-inline-warning.png)
25+
26+
[Next]({{fsdocs-next-page-link}})
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
category: getting-started
3+
categoryindex: 1
4+
index: 1
5+
---
6+
# Installation
7+
8+
## Installing the Tool
9+
10+
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:
11+
12+
```shell
13+
dotnet tool install fsharp-analyzers
14+
```
15+
16+
## Installing Analyzers
17+
18+
### Suggested Packages
19+
20+
1. [Ionide Analyzers](https://github.com/ionide/FSharp.Analyzers.SDK/)
21+
2. [G-Research Analyzers](https://github.com/G-Research/fsharp-analyzers/)
22+
23+
### Nuget
24+
25+
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.
26+
27+
```xml
28+
<PackageReference Include="G-Research.FSharp.Analyzers" Version="0.12.1">
29+
<PrivateAssets>all</PrivateAssets>
30+
<IncludeAssets>analyzers</IncludeAssets>
31+
</PackageReference>
32+
<PackageReference Include="Ionide.Analyzers" Version="0.28.0">
33+
<PrivateAssets>all</PrivateAssets>
34+
<IncludeAssets>analyzers</IncludeAssets>
35+
</PackageReference>
36+
```
37+
38+
### Paket
39+
40+
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.
41+
42+
```paket
43+
group analyzers
44+
source https://api.nuget.org/v3/index.json
45+
46+
nuget Ionide.Analyzers
47+
nuget G-Research.FSharp.Analyzers
48+
```
49+
50+
[Next]({{fsdocs-next-page-link}})

0 commit comments

Comments
 (0)