From 1fa6cd00a8e04e263c16772488d085f0bf8ea64d 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: change assembly name Of FSharpLint.Console from dotnet-fsharplint to fsharplint. This way it will be published as fsharplint package and the tool name will be just fsharplint, not dotnet-fsharplint. --- .github/workflows/build+test+deploy.yml | 4 ++-- src/FSharpLint.Console/FSharpLint.Console.fsproj | 2 +- tests/FSharpLint.FunctionalTest/TestConsoleApplication.fs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build+test+deploy.yml b/.github/workflows/build+test+deploy.yml index 10798ee27..98f50629f 100644 --- a/.github/workflows/build+test+deploy.yml +++ b/.github/workflows/build+test+deploy.yml @@ -139,8 +139,8 @@ 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 \ No newline at end of file + run: fsharplint lint ./src/FSharpLint.Console/FSharpLint.Console.fsproj --framework net8.0 \ No newline at end of file diff --git a/src/FSharpLint.Console/FSharpLint.Console.fsproj b/src/FSharpLint.Console/FSharpLint.Console.fsproj index a614e3105..1cff33374 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 Major 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 b25991d9d76dcf39276fdd336f5400160e876078 Mon Sep 17 00:00:00 2001 From: webwarrior-ws Date: Wed, 12 Nov 2025 12:27:31 +0100 Subject: [PATCH 2/3] GithubCI: test running fsharplint with dnx From locally built package. --- .github/workflows/build+test+deploy.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/build+test+deploy.yml b/.github/workflows/build+test+deploy.yml index 98f50629f..02b6f0c48 100644 --- a/.github/workflows/build+test+deploy.yml +++ b/.github/workflows/build+test+deploy.yml @@ -38,6 +38,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 deployReleaseBinaries: needs: buildAndTest From ae6e577ad521985cbaacdbe1599d5ef259d53e39 Mon Sep 17 00:00:00 2001 From: webwarrior-ws Date: Wed, 12 Nov 2025 12:40:18 +0100 Subject: [PATCH 3/3] docs,README: update docs To reflect changes in tool name from dotnet-fsharplint to fsharplint. --- README.md | 2 +- docs/content/how-tos/install-dotnet-tool.md | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3668e982e..32ab7464f 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 | Version ------- | -------- -[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/) +[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/) [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/) ## 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..22dc168e8 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 runnnig 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 `.