Skip to content

Commit

Permalink
net9pv7 passes static analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveGilham committed Aug 15, 2024
1 parent 6a7f773 commit 2b16de0
Show file tree
Hide file tree
Showing 21 changed files with 246 additions and 260 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.100-preview.6.24328.19'
dotnet-version: '9.0.100-preview.7.24407.12'
- name: Tools
run: dotnet tool restore
- name: Setup
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.100-preview.6.24328.19'
dotnet-version: '9.0.100-preview.7.24407.12'
- name: Tools
run: dotnet tool restore
- name: Setup
Expand Down
17 changes: 14 additions & 3 deletions AltCover.Avalonia/MainWindow.fs
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,11 @@ type MainWindow() as this =
"exit" ]
|> Seq.iter (fun n ->
let cap =
n.First().ToString().ToUpper() + n.Substring(1)
n
.First()
.ToString()
.ToUpper(CultureInfo.InvariantCulture)
+ n.Substring(1)

let raw =
Resource.GetResourceString(n + "Button.Label")
Expand Down Expand Up @@ -1091,8 +1095,9 @@ type MainWindow() as this =
t.Text <- String.Empty
// clear format stashes -- TODO
#if !AVALONIA11
t.FormattedText.Spans <- []
t.Tag <- t.FormattedText.Spans
let ft = t.FormattedText
ft.Spans <- []
t.Tag <- ft.Spans
#endif
)

Expand Down Expand Up @@ -1159,4 +1164,10 @@ type MainWindow() as this =
Target = "AltCover.MainWindow",
Justification = "God Object, alas")>]
#endif
[<assembly: SuppressMessage("Gendarme.Rules.Smells",
"AvoidSwitchStatementsRule",
Scope = "member", // MethodDefinition
Target =
"AltCover.MainWindow/tagByCoverage@422::Invoke(Avalonia.Controls.Presenters.TextPresenter,Microsoft.FSharp.Collections.FSharpList`1<Avalonia.Media.FormattedTextLine>,AltCover.GuiCommon/CodeTag)",
Justification = "Wrong paradigm")>]
()
1 change: 1 addition & 0 deletions AltCover.Avalonia/Persistence.fs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
namespace AltCover

open System
open System.Diagnostics.CodeAnalysis

open Avalonia
open Avalonia.Controls
Expand Down
15 changes: 8 additions & 7 deletions AltCover.DotNet/DotNet.fs
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,15 @@ module DotNet =
[<assembly: SuppressMessage("Microsoft.Performance",
"CA1810:InitializeReferenceTypeStaticFieldsInline",
Scope = "member",
Target = "<StartupCode$AltCover-DotNet>.$DotNet.#.cctor()",
Target = "AltCover.DotNet.#.cctor()",
Justification = "Compiler generated")>]
#else
[<assembly: SuppressMessage("Microsoft.Performance",
"CA1810:InitializeReferenceTypeStaticFieldsInline",
Scope = "member",
Target =
"<StartupCode$AltCover-Fake-DotNet-Testing-AltCover>.$DotNet.#.cctor()",
Justification = "Compiler generated")>]
//[<assembly: SuppressMessage("Microsoft.Performance",
// "CA1810:InitializeReferenceTypeStaticFieldsInline",
// Scope = "member",
// Target =
// "<StartupCode$AltCover-Fake-DotNet-Testing-AltCover>.$DotNet.#.cctor()",
// Justification = "Compiler generated")>]

#endif
()
Loading

0 comments on commit 2b16de0

Please sign in to comment.