Compare commits

...

6 Commits

Author SHA1 Message Date
dependabot[bot]
736d9a23af Bump ApiSurface from 5.0.2 to 5.0.3, and other version bumps (#326)
* Bump Spectre.Console from 0.53.0 to 0.54.0

---
updated-dependencies:
- dependency-name: Spectre.Console
  dependency-version: 0.54.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump actions/checkout from 5 to 6

Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump WoofWare.Myriad.Plugins from 9.0.4 to 9.1.3

---
updated-dependencies:
- dependency-name: WoofWare.Myriad.Plugins
  dependency-version: 9.1.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump Microsoft.NET.Test.Sdk from 18.0.0 to 18.0.1

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 18.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 18.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 18.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump ApiSurface from 5.0.2 to 5.0.3

---
updated-dependencies:
- dependency-name: ApiSurface
  dependency-version: 5.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Deps

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Smaug123 <3138005+Smaug123@users.noreply.github.com>
2025-11-25 12:19:56 +00:00
patrick-conscriptus[bot]
0cdbc9c106 Upgrade Nix flake and deps (#324)
* Automated commit

* Bump deps

* Bump

* Argh

---------

Co-authored-by: patrick-conscriptus[bot] <175414948+patrick-conscriptus[bot]@users.noreply.github.com>
Co-authored-by: Smaug123 <3138005+Smaug123@users.noreply.github.com>
2025-11-25 12:12:37 +00:00
Patrick Stevens
d1dde56d06 Fix filter bug (#322) 2025-11-10 19:31:33 +00:00
dependabot[bot]
c14a63b6e3 Bump FsCheck from 3.3.1 to 3.3.2 and WoofWare.PrattParser (#319)
* Bump FsCheck from 3.3.1 to 3.3.2

---
updated-dependencies:
- dependency-name: FsCheck
  dependency-version: 3.3.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump Nerdbank.GitVersioning from 3.8.118 to 3.9.50

---
updated-dependencies:
- dependency-name: Nerdbank.GitVersioning
  dependency-version: 3.9.50
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump WoofWare.PrattParser from 0.2.5 to 0.3.1

---
updated-dependencies:
- dependency-name: WoofWare.PrattParser
  dependency-version: 0.3.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Deps

* Accommodate new API

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Smaug123 <3138005+Smaug123@users.noreply.github.com>
2025-11-10 18:09:48 +00:00
patrick-conscriptus[bot]
d448865b85 Automated commit (#318)
Co-authored-by: patrick-conscriptus[bot] <175414948+patrick-conscriptus[bot]@users.noreply.github.com>
2025-11-09 00:48:06 +00:00
patrick-conscriptus[bot]
ee7aaea2d1 Automated commit (#316)
Co-authored-by: patrick-conscriptus[bot] <175414948+patrick-conscriptus[bot]@users.noreply.github.com>
2025-11-02 00:48:09 +00:00
13 changed files with 65 additions and 46 deletions

View File

@@ -9,7 +9,7 @@
]
},
"fsharp-analyzers": {
"version": "0.33.1",
"version": "0.34.1",
"commands": [
"fsharp-analyzers"
]

View File

@@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
fetch-depth: 0 # so that NerdBank.GitVersioning has access to history
- name: Install Nix
@@ -44,7 +44,7 @@ jobs:
selftest-intended-failures:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
fetch-depth: 0 # so that NerdBank.GitVersioning has access to history
- name: Install Nix
@@ -81,7 +81,7 @@ jobs:
statuses: read
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
fetch-depth: 0 # so that NerdBank.GitVersioning has access to history
- name: Install Nix
@@ -109,7 +109,7 @@ jobs:
security-events: write
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0 # so that NerdBank.GitVersioning has access to history
- name: Install Nix
@@ -122,13 +122,13 @@ jobs:
- name: Build project
run: nix develop --command dotnet build ./WoofWare.NUnitTestRunner/WoofWare.NUnitTestRunner.fsproj
- name: Run analyzers
run: nix run .#fsharp-analyzers -- --project ./WoofWare.NUnitTestRunner/WoofWare.NUnitTestRunner.fsproj --analyzers-path ./.analyzerpackages/g-research.fsharp.analyzers/*/ --verbosity detailed --report ./analysis.sarif --treat-as-error GRA-STRING-001 GRA-STRING-002 GRA-STRING-003 GRA-UNIONCASE-001 GRA-INTERPOLATED-001 GRA-TYPE-ANNOTATE-001 GRA-VIRTUALCALL-001 GRA-IMMUTABLECOLLECTIONEQUALITY-001 GRA-JSONOPTS-001 GRA-LOGARGFUNCFULLAPP-001 GRA-DISPBEFOREASYNC-001 --exclude-analyzers PartialAppAnalyzer
run: DOTNET_HOST_PATH=$(nix develop --command which dotnet) nix run .#fsharp-analyzers -- --project ./WoofWare.NUnitTestRunner/WoofWare.NUnitTestRunner.fsproj --analyzers-path ./.analyzerpackages/g-research.fsharp.analyzers/*/ --verbosity detailed --report ./analysis.sarif --treat-as-error GRA-STRING-001 GRA-STRING-002 GRA-STRING-003 GRA-UNIONCASE-001 GRA-INTERPOLATED-001 GRA-TYPE-ANNOTATE-001 GRA-VIRTUALCALL-001 GRA-IMMUTABLECOLLECTIONEQUALITY-001 GRA-JSONOPTS-001 GRA-LOGARGFUNCFULLAPP-001 GRA-DISPBEFOREASYNC-001 --exclude-analyzers PartialAppAnalyzer
build-nix:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
@@ -143,7 +143,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
@@ -156,7 +156,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
@@ -194,7 +194,7 @@ jobs:
nuget-pack:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
with:
fetch-depth: 0 # so that NerdBank.GitVersioning has access to history
- name: Install Nix
@@ -297,7 +297,7 @@ jobs:
attestations: write
contents: read
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
@@ -334,7 +334,7 @@ jobs:
attestations: write
contents: read
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
@@ -370,7 +370,7 @@ jobs:
runs-on: ubuntu-latest
needs: [nuget-pack]
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Download NuGet artifact (tool)
uses: actions/download-artifact@v6
with:
@@ -406,7 +406,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Download NuGet artifact (tool)
uses: actions/download-artifact@v6
with:

View File

@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v5
uses: actions/checkout@v6
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main

View File

@@ -29,7 +29,7 @@
<ItemGroup>
<PackageReference Include="FsUnit" Version="7.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1"/>
<PackageReference Include="NUnit" Version="4.3.2"/>
<PackageReference Include="NUnit3TestAdapter" Version="5.2.0"/>
</ItemGroup>

View File

@@ -10,7 +10,7 @@
<WarnOn>FS3388,FS3559</WarnOn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.8.118" PrivateAssets="all" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.9.50" PrivateAssets="all" />
</ItemGroup>
<PropertyGroup Condition="'$(GITHUB_ACTION)' != ''">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>

View File

@@ -108,7 +108,8 @@ module internal Lexer =
i <- i + 1
| _ ->
yield Token.single TokenType.Not startI 1
i <- i + 1
// Don't advance i here - we only consumed the '!' character
()
| Token.SingleChar token, State.Awaiting ->
i <- i + 1
yield token
@@ -162,7 +163,7 @@ module internal ParsedFilter =
match token.Type with
| TokenType.QuotedString ->
// +1 and -1, because the trivia contains the initial and terminal quote mark
// +1 to skip the initial quote; len includes the initial quote but excludes the terminal quote
inputString.Substring (start + 1, len - 1)
|> unescape
|> ParsedFilter.String
@@ -196,7 +197,12 @@ module internal ParsedFilter =
ConsumeBeforeInitialToken = false
ConsumeAfterFinalToken = false
BoundaryTokens = [ TokenType.CloseParen ]
Construct = List.exactlyOne
Construct =
fun l ->
match List.tryExactlyOne l with
| None -> failwith "expected exactly one token in stream"
| Some None -> failwith "expected parens to have contents"
| Some (Some x) -> x
}
let parse (s : string) : ParsedFilter =

View File

@@ -14,7 +14,7 @@
<PackageId>WoofWare.NUnitTestRunner.Lib</PackageId>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarnOn>FS3559</WarnOn>
<WoofWareMyriadPluginVersion>9.0.4</WoofWareMyriadPluginVersion>
<WoofWareMyriadPluginVersion>9.1.3</WoofWareMyriadPluginVersion>
</PropertyGroup>
<ItemGroup>
@@ -54,7 +54,7 @@
<EmbeddedResource Include="version.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="WoofWare.PrattParser" Version="0.2.5" />
<PackageReference Include="WoofWare.PrattParser" Version="0.3.1" />
<PackageReference Update="FSharp.Core" Version="6.0.1" />
<PackageReference Include="WoofWare.DotnetRuntimeLocator" Version="0.1.12" />
<PackageReference Include="Myriad.SDK" Version="0.8.3" PrivateAssets="all" />

View File

@@ -123,3 +123,15 @@ module TestFilter =
[<TestCaseSource(nameof xmlExamples)>]
let ``XML examples`` (example : string, expected : Filter) =
Filter.parse example |> shouldEqual expected
let negationExamples =
[
"!Name=foo", Filter.Not (Filter.Name (Match.Exact "foo"))
"!FullyQualifiedName=bar", Filter.Not (Filter.FullyQualifiedName (Match.Exact "bar"))
"!TestCategory=baz", Filter.Not (Filter.TestCategory (Match.Exact "baz"))
]
|> List.map TestCaseData
[<TestCaseSource(nameof negationExamples)>]
let ``Negation examples`` (example : string, expected : Filter) =
Filter.parse example |> shouldEqual expected

View File

@@ -17,8 +17,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="ApiSurface" Version="5.0.2" />
<PackageReference Include="FsCheck" Version="3.3.1" />
<PackageReference Include="ApiSurface" Version="5.0.3" />
<PackageReference Include="FsCheck" Version="3.3.2" />
<PackageReference Include="FsUnit" Version="7.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
<PackageReference Include="NUnit" Version="4.3.2" />

View File

@@ -35,7 +35,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Spectre.Console" Version="0.53.0" />
<PackageReference Include="Spectre.Console" Version="0.54.0" />
</ItemGroup>
<ItemGroup>

View File

@@ -10,7 +10,8 @@
</PropertyGroup>
<ItemGroup>
<PackageDownload Include="G-Research.FSharp.Analyzers" Version="[0.19.0]" />
<PackageDownload Include="G-Research.FSharp.Analyzers" Version="[0.20.0]" />
<PackageDownload Include="WoofWare.FSharpAnalyzers" Version="[0.2.5]" />
</ItemGroup>
</Project>

6
flake.lock generated
View File

@@ -20,11 +20,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1761349956,
"narHash": "sha256-tH3wHnOJms+U4k/rK2Nn1RfBrhffX92jLP/2VndSn0w=",
"lastModified": 1763618868,
"narHash": "sha256-v5afmLjn/uyD9EQuPBn7nZuaZVV9r+JerayK/4wvdWA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "02f2cb8e0feb4596d20cc52fda73ccee960e3538",
"rev": "a8d610af3f1a5fb71e23e08434d8d61a466fc942",
"type": "github"
},
"original": {

View File

@@ -1,8 +1,8 @@
[
{
"pname": "ApiSurface",
"version": "5.0.2",
"hash": "sha256-zcq1H1ccQzsZQf4kolzoOBSbyz07skihgPAvQ9Jri+E="
"version": "5.0.3",
"hash": "sha256-uU5mqLL6zMt17oPYMzhB57ryYC6O6FzSjmdTFg7LvNo="
},
{
"pname": "fantomas",
@@ -21,13 +21,13 @@
},
{
"pname": "FsCheck",
"version": "3.3.1",
"hash": "sha256-k65ksdOSOGz+meRUUND+yuqJtm5ChaKuaxmRIdKzx2Y="
"version": "3.3.2",
"hash": "sha256-3ydyTGpqySynjbcWbmFVeCBnT3KDH3miPSJYJlyxrGs="
},
{
"pname": "fsharp-analyzers",
"version": "0.33.1",
"hash": "sha256-vYXvqnf3en487svFv3CmNl24SolwMYzu6zKKGXNxSu8="
"version": "0.34.1",
"hash": "sha256-Y6PzfVGob2EgX29ZhZIde5EhiZ28Y1+U2pJ6ybIsHV0="
},
{
"pname": "FSharp.Core",
@@ -211,8 +211,8 @@
},
{
"pname": "Nerdbank.GitVersioning",
"version": "3.8.118",
"hash": "sha256-Hmyy0ZKOmwN4zIhI4+MqoN8geZNc1sd033aZJ6APrO8="
"version": "3.9.50",
"hash": "sha256-BiBfXwr8ob2HTaFk2L5TwAgtvd/EPoqudSI9nhAjQPI="
},
{
"pname": "Newtonsoft.Json",
@@ -276,8 +276,8 @@
},
{
"pname": "Spectre.Console",
"version": "0.53.0",
"hash": "sha256-XnzZoDD32DZqK/tmPVaXaclJJzb25SyMLzQ7xX3XLQw="
"version": "0.54.0",
"hash": "sha256-qlZQkT5KzACqJ1bLgBOylq9qO0L7XCh/RY8L8PnkpcU="
},
{
"pname": "System.Collections.Immutable",
@@ -351,18 +351,18 @@
},
{
"pname": "WoofWare.Myriad.Plugins",
"version": "9.0.4",
"hash": "sha256-fVahNM2SOvG159Wz6+uBkrl3+jqVtRUhZsZ2Kl2VCfk="
"version": "9.1.3",
"hash": "sha256-hgzgerZ/FyMZoYLUHttI60yCWjw5FXXRVfvAzWHoe38="
},
{
"pname": "WoofWare.Myriad.Plugins.Attributes",
"version": "3.7.3",
"hash": "sha256-scdokAtktZZ6K8c/eXm2DKtPzQPZrJLJ0cnu652uYuY="
"version": "3.8.2",
"hash": "sha256-Ergb6ubNmPrr49roqRdHr/0xlGzZMoTwJplxYU06bGU="
},
{
"pname": "WoofWare.PrattParser",
"version": "0.2.5",
"hash": "sha256-6+74AMxVIBa5rYO34Hlm02zPtRSvpcvUA6cqeYB3WoQ="
"version": "0.3.1",
"hash": "sha256-y1m9gTNH1ECDHSFpjWBDkJz7uAQmzp64eGIW3d7hoZQ="
},
{
"pname": "WoofWare.Whippet.Fantomas",