Skip to content

Commit

Permalink
Hmm. Task/Task<'T> still showing up as a problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveGilham committed Jan 21, 2023
1 parent 14b6470 commit ca7549b
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 26 deletions.
4 changes: 2 additions & 2 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"dotnet-reportgenerator-globaltool": {
"version": "5.1.13",
"version": "5.1.15",
"commands": [
"reportgenerator"
]
Expand All @@ -15,7 +15,7 @@
]
},
"altcode.gendarme-tool": {
"version": "2022.12.6.7345",
"version": "2023.1.21.13293",
"commands": [
"gendarme"
]
Expand Down
17 changes: 0 additions & 17 deletions AltCover.Avalonia/MainWindow.fs
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,6 @@ type MainWindow() as this =
[<SuppressMessage("Gendarme.Rules.Smells",
"AvoidSwitchStatementsRule",
Justification = "This is FP, not OO")>]
[<SuppressMessage("Gendarme.Rules.Correctness",
"EnsureLocalDisposalRule",
Justification = "Asynch task to tidy up")>]
member private this.ShowMessageBox (status: MessageType) caption message =
let dlg =
MessageBox.Avalonia.DTO.MessageBoxCustomParamsWithImage()
Expand Down Expand Up @@ -1124,18 +1121,4 @@ type MainWindow() as this =
Target = "AltCover.MainWindow",
Justification = "God Object, alas")>]
#endif
[<assembly: SuppressMessage("Gendarme.Rules.Correctness",
"EnsureLocalDisposalRule",
Scope = "member", // MethodDefinition
Target =
"<StartupCode$AltCover-Visualizer>.$MainWindow/Pipe #1 input at line 520@517::Invoke(Microsoft.FSharp.Core.Unit)",
Justification =
"Local of type 'Task`1' is not disposed of. Hmm.")>]
[<assembly: SuppressMessage("Gendarme.Rules.Correctness",
"EnsureLocalDisposalRule",
Scope = "member", // MethodDefinition
Target =
"<StartupCode$AltCover-Visualizer>.$MainWindow/InitializeComponent@865-7::Invoke(Avalonia.Interactivity.RoutedEventArgs)",
Justification =
"Local of type 'Task' is not disposed of (at least not locally)")>]
()
10 changes: 9 additions & 1 deletion AltCover.Engine/CommandLine.fs
Original file line number Diff line number Diff line change
Expand Up @@ -488,4 +488,12 @@ module internal CommandLine =
Output.echo <- writeErr
Output.info <- writeOut
Output.verbose <- writeOut
Output.warn <- writeOut
Output.warn <- writeOut

[<assembly: SuppressMessage("Gendarme.Rules.Exceptions",
"InstantiateArgumentExceptionCorrectlyRule",
Scope = "member", // MethodDefinition
Target =
"AltCover.CommandLine/I/transform@286::Invoke(System.String[])",
Justification = "Inlined library code")>]
()
12 changes: 12 additions & 0 deletions AltCover.Engine/Visitor.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1646,4 +1646,16 @@ module internal Visitor =
Target =
"AltCover.Visitor/I/generated@1375::Invoke(Mono.Cecil.Cil.Instruction)",
Justification = "No direct call available")>]
[<assembly: SuppressMessage("Gendarme.Rules.Exceptions",
"InstantiateArgumentExceptionCorrectlyRule",
Scope = "member", // MethodDefinition
Target =
"AltCover.Visitor/I/start@1230::Invoke(Microsoft.FSharp.Core.FSharpFunc`2<Mono.Cecil.Cil.Instruction,System.Int32>,Microsoft.FSharp.Collections.FSharpList`1<Mono.Cecil.Cil.Instruction>)",
Justification = "Inlined library code")>]
[<assembly: SuppressMessage("Gendarme.Rules.Exceptions",
"InstantiateArgumentExceptionCorrectlyRule",
Scope = "member", // MethodDefinition
Target =
"AltCover.Visitor/I/finish@1233::Invoke(Microsoft.FSharp.Core.FSharpFunc`2<Mono.Cecil.Cil.Instruction,System.Int32>,Microsoft.FSharp.Collections.FSharpList`1<Mono.Cecil.Cil.Instruction>)",
Justification = "Inlined library code")>]
()
5 changes: 5 additions & 0 deletions AltCover.PowerShell/OpenCover.fs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,11 @@ type MergeOpenCoverCommand() =

override self.BeginProcessing() = self.Files.Clear()

[<SuppressMessage("Gendarme.Rules.Exceptions",
"InstantiateArgumentExceptionCorrectlyRule",
Scope = "member", // MethodDefinition
Target = "AltCover.Commands.MergeOpenCoverCommand::FilesToDocuments()",
Justification = "Inlined library code")>]
member private self.FilesToDocuments() =
self.InputFile
|> Array.map XDocument.Load
Expand Down
5 changes: 5 additions & 0 deletions AltCover.UICommon/CoverageFileTree.fs
Original file line number Diff line number Diff line change
Expand Up @@ -623,4 +623,9 @@ module CoverageFileTree =
Target =
"AltCover.CoverageFileTree/applyMethod@165::Invoke(AltCover.CoverageTreeContext`2<TModel,TRow>,AltCover.GuiCommon/MethodKey)",
Justification = "Possibly too much work")>]
[<assembly: SuppressMessage("Gendarme.Rules.Exceptions",
"InstantiateArgumentExceptionCorrectlyRule",
Scope = "member", // MethodDefinition
Target = "AltCover.CoverageFileTree/applyMethods@357-1::Invoke(System.Tuple`2<System.Tuple`2<System.String,AltCover.GuiCommon/MethodType>,a>[])",
Justification = "Inlined library code")>]
()
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFrameworks>net7.0;net472</TargetFrameworks>
<IsPackable>false</IsPackable>
<GendarmeVersion>2022.12.6.7345</GendarmeVersion>
<GendarmeVersion>2023.1.21.13293</GendarmeVersion>
<GendarmeToolDir>..\packages\altcode.gendarme\$(GendarmeVersion)\tools\</GendarmeToolDir>
<GenerateProgramFile>false</GenerateProgramFile>
<AssemblyName>AltCover.ValidateGendarmeEmulation</AssemblyName>
Expand Down
10 changes: 5 additions & 5 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<ItemGroup>
<PackageVersion Include="AltCode.Fake.DotNet.Gendarme" Version="5.23.0.42" />
<PackageVersion Include="AltCode.Dixon" Version="2022.12.6.11014" />
<PackageVersion Include="altcode.gendarme" Version="2022.12.6.7345" />
<PackageVersion Include="altcode.gendarme" Version="2023.1.21.13293" />
<PackageVersion Include="altcover" Version="8.6.14" />
<PackageVersion Include="AltCover.Api" Version="8.6.14" />
<PackageVersion Include="AltCover.Fake" Version="8.6.14" />
Expand All @@ -17,7 +17,7 @@
<PackageVersion Include="Cake.Common" Condition="'$(TargetFramework)' == 'netcoreapp3.1'" Version="2.0.0" />
<PackageVersion Include="Cake.Core" Condition="'$(TargetFramework)' == 'netstandard2.0'" Version="1.0.0" />
<PackageVersion Include="Cake.Core" Condition="'$(TargetFramework)' == 'netcoreapp3.1'" Version="2.0.0" />
<PackageVersion Include="CommunityToolkit.Diagnostics" Version="8.0.0" />
<PackageVersion Include="CommunityToolkit.Diagnostics" Version="8.1.0" />
<PackageVersion Include="coverlet.collector" Version="3.2.0" />
<PackageVersion Include="CsvTextFieldParser" Version="1.2.2" />
<PackageVersion Include="DotNet.ReproducibleBuilds" Version="1.1.1" />
Expand All @@ -41,7 +41,7 @@
<PackageVersion Include="Fake.Tools.git" Version="5.23.0" />
<PackageVersion Include="FSharp.Compiler.Tools" Version="10.2.3" />
<PackageVersion Include="FSharp.Core" Version="7.0.0" />
<PackageVersion Include="FsUnit" Version="5.1.0" />
<PackageVersion Include="FsUnit" Version="5.2.0" />
<PackageVersion Include="FuChu" Version="1.1.0" />
<PackageVersion Include="GtkSharp" Version="3.24.24.38" />
<PackageVersion Include="Handlebars.Net" Version="2.1.2" />
Expand All @@ -50,7 +50,7 @@
<PackageVersion Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" Version="2.1.1" />
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="16.0.461" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.4.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.3" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
<!-- PackageVersion Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" / -->
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
Expand All @@ -68,7 +68,7 @@
<!-- This one w/just net20/net40 agents works as before on Linux for the AltCoverRunner test -->
<PackageVersion Include="NUnit.ConsoleRunner" Condition="'$(OS)' != 'Windows_NT'" Version="3.12.0" />
<!-- This one w/extra netcore3.1 agent causes mono vs framework problems for some reason on the AltCoverRunner test -->
<PackageVersion Include="NUnit.ConsoleRunner" Condition="'$(OS)' == 'Windows_NT'" Version="3.16.1" />
<PackageVersion Include="NUnit.ConsoleRunner" Condition="'$(OS)' == 'Windows_NT'" Version="3.16.2" />
<PackageVersion Include="OpenCover" Version="4.7.1221" />
<PackageVersion Include="Pester" Version="5.4.0" />
<PackageVersion Include="PowerShellStandard.Library" Version="5.1.1" />
Expand Down
1 change: 1 addition & 0 deletions MCS.sln
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{121FB9B3-C225-4FF9-AD1D-F4AE9537BACF}"
ProjectSection(SolutionItems) = preProject
Directory.Packages.props = Directory.Packages.props
.config\dotnet-tools.json = .config\dotnet-tools.json
NuGet.config = NuGet.config
EndProjectSection
EndProject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>8.0</LangVersion>
<SignAssembly>false</SignAssembly>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit ca7549b

Please sign in to comment.