From 5c3911198096f9a1338ccbc9f313b19d32221786 Mon Sep 17 00:00:00 2001 From: webwarrior-ws Date: Wed, 12 Nov 2025 11:56:02 +0100 Subject: [PATCH 1/3] 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. --- .github/workflows/build+test+deploy.yml | 30 ++++++++++++++++--- README.md | 2 +- docs/content/how-tos/install-dotnet-tool.md | 18 +++++++---- .../FSharpLint.Console.fsproj | 2 +- .../TestConsoleApplication.fs | 2 +- 5 files changed, 42 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build+test+deploy.yml b/.github/workflows/build+test+deploy.yml index 1aa9c4182..4cc0bf538 100644 --- a/.github/workflows/build+test+deploy.yml +++ b/.github/workflows/build+test+deploy.yml @@ -36,6 +36,28 @@ jobs: - name: Run FSharpLint on itself run: make selfcheck + testToolInvocation: + needs: buildAndTest + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + global-json-file: global.json + - name: Setup .NET 10 + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '10.0.x' + - name: Restore tools + run: dotnet tool restore + - name: Build and pack + run: dotnet fsi build.fsx -t Pack + - name: Remove global.json to allow using .NET 10 SDK (for dnx) + run: rm --force global.json + - name: Run fsharplint as tool using dnx + run: dnx fsharplint lint ./src/FSharpLint.Console/FSharpLint.Console.fsproj --source ./out/ --prerelease --yes --interactive false packReleaseBinaries: needs: buildAndTest @@ -161,11 +183,11 @@ jobs: EOF - name: Install FSharpLint from downloaded binaries - run: dotnet tool install --global dotnet-fsharplint --prerelease --framework net8.0 + run: dotnet tool install --global fsharplint --prerelease --framework net8.0 - name: Add .NET tools to PATH run: echo "$HOME/.dotnet/tools" >> $GITHUB_PATH - name: Lint FSharpLint.Console project (net8.0 only) - run: dotnet fsharplint lint ./src/FSharpLint.Console/FSharpLint.Console.fsproj --framework net8.0 + run: fsharplint lint ./src/FSharpLint.Console/FSharpLint.Console.fsproj --framework net8.0 testReleaseBinariesWithDotNet10: needs: packReleaseBinaries @@ -195,8 +217,8 @@ jobs: EOF - name: Install FSharpLint from downloaded binaries - run: dotnet tool install --global dotnet-fsharplint --prerelease + run: dotnet tool install --global fsharplint --prerelease - name: Add .NET tools to PATH run: echo "$HOME/.dotnet/tools" >> $GITHUB_PATH - name: Lint FSharpLint.Console project - run: dotnet fsharplint lint ./src/FSharpLint.Console/FSharpLint.Console.fsproj + run: fsharplint lint ./src/FSharpLint.Console/FSharpLint.Console.fsproj diff --git a/README.md b/README.md index 60a846d90..a71b57761 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ The [docs](http://fsprojects.github.io/FSharpLint/) contain an overview of the t Package | Latest Stable Version | Latest Version (including Pre-Releases) ------- | --------------------- | ---------------------------------------- -[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/) +[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/) [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/) ## How to build diff --git a/docs/content/how-tos/install-dotnet-tool.md b/docs/content/how-tos/install-dotnet-tool.md index 69d996ffa..c2befcc50 100644 --- a/docs/content/how-tos/install-dotnet-tool.md +++ b/docs/content/how-tos/install-dotnet-tool.md @@ -4,16 +4,24 @@ category: how-to menu_order: 1 --- -# Installing as dotnet tool +# Running fsharplint + +The console application is a wrapper around the linter. For basic usage, just run `dnx fsharplint lint `, 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. + +Run `dnx fsharplint --help` for full usage information. + +# Installing and running on .NET versions before 10 + +## Installing as dotnet tool The linter can be [installed as a dotnet tool](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-tool-install). -Install as a global tool: `dotnet tool install -g dotnet-fsharplint`. +Install as a global tool: `dotnet tool install -g fsharplint`. -Install as tool to specific directory: `dotnet tool install --tool-path dotnet-fsharplint` +Install as tool to specific directory: `dotnet tool install --tool-path fsharplint` ## Running the Console Application -The console application is a wrapper around the linter. For basic usage, just run `dotnet fsharplint lint `, where `input` can be an fsproj, sln, fs, fsx file, or a string of source code. +If installed as a local tool, run `dotnet fsharplint lint ` -Run `dotnet fsharplint --help` for full usage information. +If installed as a global tool, run it as `fsharplint lint `. diff --git a/src/FSharpLint.Console/FSharpLint.Console.fsproj b/src/FSharpLint.Console/FSharpLint.Console.fsproj index 03c445115..b29ccfa75 100644 --- a/src/FSharpLint.Console/FSharpLint.Console.fsproj +++ b/src/FSharpLint.Console/FSharpLint.Console.fsproj @@ -9,7 +9,7 @@ F#;fsharp;lint;FSharpLint;fslint;cli DotNetCliTool true - dotnet-fsharplint + fsharplint FSharpLint.Console true LatestMajor diff --git a/tests/FSharpLint.FunctionalTest/TestConsoleApplication.fs b/tests/FSharpLint.FunctionalTest/TestConsoleApplication.fs index bd6f9cb06..94f229c43 100644 --- a/tests/FSharpLint.FunctionalTest/TestConsoleApplication.fs +++ b/tests/FSharpLint.FunctionalTest/TestConsoleApplication.fs @@ -39,7 +39,7 @@ module Tests = |> Seq.sortByDescending _.Name |> Seq.tryHead match dllDir with - | Some dir -> dir.FullName "dotnet-fsharplint.dll" + | Some dir -> dir.FullName "fsharplint.dll" | None -> failwithf "No target framework folder found in %s" binDir.FullName let startInfo = ProcessStartInfo From 2e7d25887747c609db1417180fa927a19e0a5443 Mon Sep 17 00:00:00 2001 From: "Andres G. Aragoneses" Date: Fri, 9 Jan 2026 19:16:49 +0800 Subject: [PATCH 2/3] Console,FunctionalTest,docs,ReadMe,CI: upd tool name As we haven't been able to get ahold of the original/previous maintainer to ask his opinion (and his permission) to override old nuget package named 'fsharplint', then we're switching to the even better and shorter "fslint" name. Closes https://github.com/fsprojects/FSharpLint/issues/746 --- .github/workflows/build+test+deploy.yml | 10 +++++----- README.md | 2 +- docs/content/how-tos/install-dotnet-tool.md | 12 ++++++------ src/FSharpLint.Console/FSharpLint.Console.fsproj | 2 +- .../TestConsoleApplication.fs | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build+test+deploy.yml b/.github/workflows/build+test+deploy.yml index 4cc0bf538..7ab6aeea2 100644 --- a/.github/workflows/build+test+deploy.yml +++ b/.github/workflows/build+test+deploy.yml @@ -57,7 +57,7 @@ jobs: - name: Remove global.json to allow using .NET 10 SDK (for dnx) run: rm --force global.json - name: Run fsharplint as tool using dnx - run: dnx fsharplint lint ./src/FSharpLint.Console/FSharpLint.Console.fsproj --source ./out/ --prerelease --yes --interactive false + run: dnx fslint lint ./src/FSharpLint.Console/FSharpLint.Console.fsproj --source ./out/ --prerelease --yes --interactive false packReleaseBinaries: needs: buildAndTest @@ -183,11 +183,11 @@ jobs: EOF - name: Install FSharpLint from downloaded binaries - run: dotnet tool install --global fsharplint --prerelease --framework net8.0 + run: dotnet tool install --global fslint --prerelease --framework net8.0 - name: Add .NET tools to PATH run: echo "$HOME/.dotnet/tools" >> $GITHUB_PATH - name: Lint FSharpLint.Console project (net8.0 only) - run: fsharplint lint ./src/FSharpLint.Console/FSharpLint.Console.fsproj --framework net8.0 + run: fslint lint ./src/FSharpLint.Console/FSharpLint.Console.fsproj --framework net8.0 testReleaseBinariesWithDotNet10: needs: packReleaseBinaries @@ -217,8 +217,8 @@ jobs: EOF - name: Install FSharpLint from downloaded binaries - run: dotnet tool install --global fsharplint --prerelease + run: dotnet tool install --global fslint --prerelease - name: Add .NET tools to PATH run: echo "$HOME/.dotnet/tools" >> $GITHUB_PATH - name: Lint FSharpLint.Console project - run: fsharplint lint ./src/FSharpLint.Console/FSharpLint.Console.fsproj + run: fslint lint ./src/FSharpLint.Console/FSharpLint.Console.fsproj diff --git a/README.md b/README.md index a71b57761..10d4c7c40 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ The [docs](http://fsprojects.github.io/FSharpLint/) contain an overview of the t Package | Latest Stable Version | Latest Version (including Pre-Releases) ------- | --------------------- | ---------------------------------------- -[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/) +[dotnet tool](https://www.nuget.org/packages/fslint/) | [![NuGet Status](http://img.shields.io/nuget/v/fslint.svg?style=flat)](https://www.nuget.org/packages/fslint/) | [![NuGet Status](http://img.shields.io/nuget/vpre/fslint.svg?style=flat)](https://www.nuget.org/packages/fslint/) [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/) ## How to build diff --git a/docs/content/how-tos/install-dotnet-tool.md b/docs/content/how-tos/install-dotnet-tool.md index c2befcc50..83fc2098a 100644 --- a/docs/content/how-tos/install-dotnet-tool.md +++ b/docs/content/how-tos/install-dotnet-tool.md @@ -6,22 +6,22 @@ menu_order: 1 # Running fsharplint -The console application is a wrapper around the linter. For basic usage, just run `dnx fsharplint lint `, 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. +The console application is a wrapper around the linter. For basic usage, just run `dnx fslint lint `, 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. Run `dnx fsharplint --help` for full usage information. -# Installing and running on .NET versions before 10 +# Installing and running on .NET versions older than 10.0 ## Installing as dotnet tool The linter can be [installed as a dotnet tool](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-tool-install). -Install as a global tool: `dotnet tool install -g fsharplint`. +Install as a global tool: `dotnet tool install -g fslint`. -Install as tool to specific directory: `dotnet tool install --tool-path fsharplint` +Install as tool to specific directory: `dotnet tool install --tool-path fslint` ## Running the Console Application -If installed as a local tool, run `dotnet fsharplint lint ` +If installed as a local tool, run `dotnet fslint lint ` -If installed as a global tool, run it as `fsharplint lint `. +If installed as a global tool, run it as `fslint lint `. diff --git a/src/FSharpLint.Console/FSharpLint.Console.fsproj b/src/FSharpLint.Console/FSharpLint.Console.fsproj index b29ccfa75..68a20a3e5 100644 --- a/src/FSharpLint.Console/FSharpLint.Console.fsproj +++ b/src/FSharpLint.Console/FSharpLint.Console.fsproj @@ -9,7 +9,7 @@ F#;fsharp;lint;FSharpLint;fslint;cli DotNetCliTool true - fsharplint + fslint FSharpLint.Console true LatestMajor diff --git a/tests/FSharpLint.FunctionalTest/TestConsoleApplication.fs b/tests/FSharpLint.FunctionalTest/TestConsoleApplication.fs index 94f229c43..de3d6233d 100644 --- a/tests/FSharpLint.FunctionalTest/TestConsoleApplication.fs +++ b/tests/FSharpLint.FunctionalTest/TestConsoleApplication.fs @@ -39,7 +39,7 @@ module Tests = |> Seq.sortByDescending _.Name |> Seq.tryHead match dllDir with - | Some dir -> dir.FullName "fsharplint.dll" + | Some dir -> dir.FullName "fslint.dll" | None -> failwithf "No target framework folder found in %s" binDir.FullName let startInfo = ProcessStartInfo From f2d987f90f6074cb57dc2d59c1da226757063a86 Mon Sep 17 00:00:00 2001 From: "Andres G. Aragoneses" Date: Fri, 9 Jan 2026 19:56:37 +0800 Subject: [PATCH 3/3] Temporarily revert Nuget badge for stable version of dotnet tool It would be better to only change this (revert this commit) when releasing v1.0; otherwise this would point to the 0.0.1 fslint stub that does nothing. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 10d4c7c40..229c1a76e 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ The [docs](http://fsprojects.github.io/FSharpLint/) contain an overview of the t Package | Latest Stable Version | Latest Version (including Pre-Releases) ------- | --------------------- | ---------------------------------------- -[dotnet tool](https://www.nuget.org/packages/fslint/) | [![NuGet Status](http://img.shields.io/nuget/v/fslint.svg?style=flat)](https://www.nuget.org/packages/fslint/) | [![NuGet Status](http://img.shields.io/nuget/vpre/fslint.svg?style=flat)](https://www.nuget.org/packages/fslint/) +dotnet tool | [![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/fslint.svg?style=flat)](https://www.nuget.org/packages/fslint/) [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/) ## How to build