Skip to content

Commit 5c39111

Browse files
webwarrior-wsknocte
authored andcommitted
Console,FunctionalTest,docs,ReadMe,CI: upd tool name
Change assembly name of FSharpLint.Console project from the (too long & convolutted) `dotnet-fsharplint` to the original `fsharplint`. This way it will be published as fsharplint nuget package and the tool name will be just fsharplint, not dotnet-fsharplint.
1 parent 87af475 commit 5c39111

5 files changed

Lines changed: 42 additions & 12 deletions

File tree

.github/workflows/build+test+deploy.yml

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,28 @@ jobs:
3636
- name: Run FSharpLint on itself
3737
run: make selfcheck
3838

39+
testToolInvocation:
40+
needs: buildAndTest
41+
runs-on: ubuntu-latest
42+
43+
steps:
44+
- uses: actions/checkout@v4
45+
- name: Setup .NET
46+
uses: actions/setup-dotnet@v4
47+
with:
48+
global-json-file: global.json
49+
- name: Setup .NET 10
50+
uses: actions/setup-dotnet@v4
51+
with:
52+
dotnet-version: '10.0.x'
53+
- name: Restore tools
54+
run: dotnet tool restore
55+
- name: Build and pack
56+
run: dotnet fsi build.fsx -t Pack
57+
- name: Remove global.json to allow using .NET 10 SDK (for dnx)
58+
run: rm --force global.json
59+
- name: Run fsharplint as tool using dnx
60+
run: dnx fsharplint lint ./src/FSharpLint.Console/FSharpLint.Console.fsproj --source ./out/ --prerelease --yes --interactive false
3961

4062
packReleaseBinaries:
4163
needs: buildAndTest
@@ -161,11 +183,11 @@ jobs:
161183
</configuration>
162184
EOF
163185
- name: Install FSharpLint from downloaded binaries
164-
run: dotnet tool install --global dotnet-fsharplint --prerelease --framework net8.0
186+
run: dotnet tool install --global fsharplint --prerelease --framework net8.0
165187
- name: Add .NET tools to PATH
166188
run: echo "$HOME/.dotnet/tools" >> $GITHUB_PATH
167189
- name: Lint FSharpLint.Console project (net8.0 only)
168-
run: dotnet fsharplint lint ./src/FSharpLint.Console/FSharpLint.Console.fsproj --framework net8.0
190+
run: fsharplint lint ./src/FSharpLint.Console/FSharpLint.Console.fsproj --framework net8.0
169191

170192
testReleaseBinariesWithDotNet10:
171193
needs: packReleaseBinaries
@@ -195,8 +217,8 @@ jobs:
195217
</configuration>
196218
EOF
197219
- name: Install FSharpLint from downloaded binaries
198-
run: dotnet tool install --global dotnet-fsharplint --prerelease
220+
run: dotnet tool install --global fsharplint --prerelease
199221
- name: Add .NET tools to PATH
200222
run: echo "$HOME/.dotnet/tools" >> $GITHUB_PATH
201223
- name: Lint FSharpLint.Console project
202-
run: dotnet fsharplint lint ./src/FSharpLint.Console/FSharpLint.Console.fsproj
224+
run: fsharplint lint ./src/FSharpLint.Console/FSharpLint.Console.fsproj

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The [docs](http://fsprojects.github.io/FSharpLint/) contain an overview of the t
3232

3333
Package | Latest Stable Version | Latest Version (including Pre-Releases)
3434
------- | --------------------- | ----------------------------------------
35-
[dotnet tool](https://www.nuget.org/packages/dotnet-fsharplint/) | [![NuGet Status](http://img.shields.io/nuget/v/dotnet-fsharplint.svg?style=flat)](https://www.nuget.org/packages/dotnet-fsharplint/) | [![NuGet Status](http://img.shields.io/nuget/vpre/dotnet-fsharplint.svg?style=flat)](https://www.nuget.org/packages/dotnet-fsharplint/)
35+
[dotnet tool](https://www.nuget.org/packages/fsharplint/) | [![NuGet Status](http://img.shields.io/nuget/v/fsharplint.svg?style=flat)](https://www.nuget.org/packages/fsharplint/) | [![NuGet Status](http://img.shields.io/nuget/vpre/fsharplint.svg?style=flat)](https://www.nuget.org/packages/fsharplint/)
3636
[API](https://www.nuget.org/packages/FSharpLint.Core/) | [![NuGet Status](http://img.shields.io/nuget/v/FSharpLint.Core.svg?style=flat)](https://www.nuget.org/packages/FSharpLint.Core/) | [![NuGet Status](http://img.shields.io/nuget/vpre/FSharpLint.Core.svg?style=flat)](https://www.nuget.org/packages/FSharpLint.Core/)
3737

3838
## How to build

docs/content/how-tos/install-dotnet-tool.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,24 @@ category: how-to
44
menu_order: 1
55
---
66

7-
# Installing as dotnet tool
7+
# Running fsharplint
8+
9+
The console application is a wrapper around the linter. For basic usage, just run `dnx fsharplint lint <input>`, where `input` can be an fsproj, sln, fs, fsx file, or a string of source code. This will install (if run for the first time) and run fsharplint.
10+
11+
Run `dnx fsharplint --help` for full usage information.
12+
13+
# Installing and running on .NET versions before 10
14+
15+
## Installing as dotnet tool
816

917
The linter can be [installed as a dotnet tool](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-tool-install).
1018

11-
Install as a global tool: `dotnet tool install -g dotnet-fsharplint`.
19+
Install as a global tool: `dotnet tool install -g fsharplint`.
1220

13-
Install as tool to specific directory: `dotnet tool install --tool-path <my_directory> dotnet-fsharplint`
21+
Install as tool to specific directory: `dotnet tool install --tool-path <my_directory> fsharplint`
1422

1523
## Running the Console Application
1624

17-
The console application is a wrapper around the linter. For basic usage, just run `dotnet fsharplint lint <input>`, where `input` can be an fsproj, sln, fs, fsx file, or a string of source code.
25+
If installed as a local tool, run `dotnet fsharplint lint <input>`
1826

19-
Run `dotnet fsharplint --help` for full usage information.
27+
If installed as a global tool, run it as `fsharplint lint <input>`.

src/FSharpLint.Console/FSharpLint.Console.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<PackageTags>F#;fsharp;lint;FSharpLint;fslint;cli</PackageTags>
1010
<PackageType>DotNetCliTool</PackageType>
1111
<PackAsTool>true</PackAsTool>
12-
<AssemblyName>dotnet-fsharplint</AssemblyName>
12+
<AssemblyName>fsharplint</AssemblyName>
1313
<RootNamespace>FSharpLint.Console</RootNamespace>
1414
<IsPackable>true</IsPackable>
1515
<RollForward>LatestMajor</RollForward>

tests/FSharpLint.FunctionalTest/TestConsoleApplication.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ module Tests =
3939
|> Seq.sortByDescending _.Name
4040
|> Seq.tryHead
4141
match dllDir with
42-
| Some dir -> dir.FullName </> "dotnet-fsharplint.dll"
42+
| Some dir -> dir.FullName </> "fsharplint.dll"
4343
| None -> failwithf "No target framework folder found in %s" binDir.FullName
4444

4545
let startInfo = ProcessStartInfo

0 commit comments

Comments
 (0)