diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 41e34d446..ef1503942 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "dotnet-reportgenerator-globaltool": { - "version": "5.2.2", + "version": "5.2.4", "commands": [ "reportgenerator" ] diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5c831acdd..e37894bf9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,7 +32,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.0.202' + dotnet-version: '8.0.204' - name: Tools run: dotnet tool restore - name: Setup @@ -63,7 +63,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.0.202' + dotnet-version: '8.0.204' - name: Tools run: dotnet tool restore - name: Setup diff --git a/AltCover.Api.Tests/AltCover.Api.Tests.fsproj b/AltCover.Api.Tests/AltCover.Api.Tests.fsproj index 30796da07..a4ac8592f 100644 --- a/AltCover.Api.Tests/AltCover.Api.Tests.fsproj +++ b/AltCover.Api.Tests/AltCover.Api.Tests.fsproj @@ -12,7 +12,7 @@ - + @@ -73,20 +73,20 @@ - ..\ThirdParty\cecil\Mono.Cecil.dll - - - ..\ThirdParty\cecil\Mono.Cecil.Rocks.dll + $(SolutionDir)\ThirdParty\cecil\Mono.Cecil.dll - ..\ThirdParty\cecil\Mono.Cecil.Mdb.dll + $(SolutionDir)\ThirdParty\cecil\Mono.Cecil.Mdb.dll - ..\ThirdParty\cecil\Mono.Cecil.Pdb.dll + $(SolutionDir)\ThirdParty\cecil\Mono.Cecil.Pdb.dll + + + $(SolutionDir)\ThirdParty\cecil\Mono.Cecil.Rocks.dll ..\ThirdParty\Unquote.dll - + diff --git a/AltCover.Api.Tests/FSApiTests.fs b/AltCover.Api.Tests/FSApiTests.fs index 787ed7061..2e6e16fb8 100644 --- a/AltCover.Api.Tests/FSApiTests.fs +++ b/AltCover.Api.Tests/FSApiTests.fs @@ -1148,7 +1148,7 @@ module FSApiTests = Assembly .GetExecutingAssembly() .GetManifestResourceNames() - |> Seq.find _.EndsWith("AltCover.targets", StringComparison.Ordinal) + |> Seq.find _.EndsWith("AltCover.proj", StringComparison.Ordinal) use stream = Assembly diff --git a/AltCover.Engine/CecilEx.fs b/AltCover.Engine/CecilEx.fs index df95bd1bf..fb7927fb8 100644 --- a/AltCover.Engine/CecilEx.fs +++ b/AltCover.Engine/CecilEx.fs @@ -130,6 +130,14 @@ type internal AssemblyResolver() as self = "dotnet|shared" .Replace('|', Path.DirectorySeparatorChar) + let wingac = + "Microsoft.NET|assembly" + .Replace('|', Path.DirectorySeparatorChar) + + let monogac = + "lib|mono|gac" + .Replace('|', Path.DirectorySeparatorChar) + let sources = [ AssemblyConstants.packageEnv [ Environment.GetEnvironmentVariable "ProgramFiles" @@ -139,7 +147,14 @@ type internal AssemblyResolver() as self = Some <| Path.Combine(shareLocal, dotnetShared) AssemblyConstants.dotnetDir |> Option.map (fun p -> Path.Combine(p, "shared")) - Some AssemblyConstants.nugetCache ] + Some AssemblyConstants.nugetCache + Some <| Path.Combine("usr", monogac) + Environment.GetEnvironmentVariable "WinDir" + |> Option.ofObj + |> Option.map (fun p -> Path.Combine(p, wingac)) + Environment.GetEnvironmentVariable "MONO_GAC_PREFIX" + |> Option.ofObj + |> Option.map (fun p -> Path.Combine(p, monogac)) ] |> List.choose id ] |> List.concat |> List.filter Directory.Exists diff --git a/AltCover.Engine/Json.fs b/AltCover.Engine/Json.fs index 0a7ab364f..6d2f285b6 100644 --- a/AltCover.Engine/Json.fs +++ b/AltCover.Engine/Json.fs @@ -327,9 +327,10 @@ module internal Json = )) let tracked = - System.Collections.Generic.Dictionary() + System.Collections.Generic.Dictionary< + string, + int * NativeJson.Times * NativeJson.Times + >() x.Descendants(XName.Get "TrackedMethod") |> Seq.iter (fun x -> diff --git a/AltCover.Engine/Runner.fs b/AltCover.Engine/Runner.fs index 580a29c8b..4a7dc9e9b 100644 --- a/AltCover.Engine/Runner.fs +++ b/AltCover.Engine/Runner.fs @@ -1486,6 +1486,8 @@ module internal Runner = |> J.getFirstOperandAsNumber |> enum + use _ = fst pair + let hits = Dictionary>() diff --git a/AltCover.Engine/Strings.eo.resx b/AltCover.Engine/Strings.eo.resx index 3500da2d6..3ed9036b1 100644 --- a/AltCover.Engine/Strings.eo.resx +++ b/AltCover.Engine/Strings.eo.resx @@ -471,4 +471,7 @@ Se la opcio ne ĉeestas, tiam la defaŭlta estas 'OC'. Laŭvola: porteblaj operacioj - priraporta raporto, kontroldosiero kaj registritaj datumoj samlokaj kun la registrilo. + + Malsukcesis forigi dosieron {0} + \ No newline at end of file diff --git a/AltCover.Engine/Strings.resx b/AltCover.Engine/Strings.resx index 05875a387..ae2534d21 100644 --- a/AltCover.Engine/Strings.resx +++ b/AltCover.Engine/Strings.resx @@ -475,4 +475,7 @@ If the option is not present, then the default is 'OC'. Optional: portable operations - coverage report, control file and recorded data co-located with the recorder assembly + + Failed to delete file {0} + \ No newline at end of file diff --git a/AltCover.Engine/Tasks.fs b/AltCover.Engine/Tasks.fs index 4226bee2a..5f76bb11a 100644 --- a/AltCover.Engine/Tasks.fs +++ b/AltCover.Engine/Tasks.fs @@ -540,13 +540,20 @@ type RetryDelete() = Justification = "MSBuild tasks use arrays")>] member val Files: string array = [||] with get, set - member internal self.Write message = - ``base``.Log.LogMessage(MessageImportance.High, message) + [] + member internal self.Write0 (o: string -> unit) (f: string) (_: string) : unit = + CommandLine.Format.Local("FailedToDelete", f) |> o + + member internal self.Write (f: string) (dummy: string) : unit = + self.Write0 (``base``.Log.LogWarning) f dummy override self.Execute() = if self.Files.IsNotNull then self.Files |> Seq.filter File.Exists - |> Seq.iter (CommandLine.I.doRetry File.Delete self.Write 10 1000 0) + |> Seq.iter (fun f -> + (CommandLine.I.doRetry File.Delete (self.Write f) 100 100 0 f)) true \ No newline at end of file diff --git a/AltCover.PowerShell/Command.fs b/AltCover.PowerShell/Command.fs index 72db7af7f..558368eb6 100644 --- a/AltCover.PowerShell/Command.fs +++ b/AltCover.PowerShell/Command.fs @@ -508,7 +508,7 @@ type InvokeAltCoverCommand() = member val Single: SwitchParameter = SwitchParameter(false) with get, set /// - /// Do not record branch coverage. Is not compatible with, the -ReportFormat "ncover" option. Incompatible with `-BranchCover`. + /// Do not record branch coverage. Is not compatible with the -ReportFormat "ncover" option. Incompatible with `-BranchCover`. /// [ - /// Do not record line coverage. Is not compatible with, the -ReportFormat "ncover" option. Incompatible with `-LineCover`. + /// Do not record line coverage. Is not compatible with the -ReportFormat "ncover" option. Incompatible with `-LineCover`. /// [ System.Exception> - ( - (unique: string), - (called: bool array) - ) = + ((unique: string), (called: bool array)) + = let constructor = typeof<'T> .GetConstructor([| typeof |]) diff --git a/AltCover.Tests/AltCover.Tests.fsproj b/AltCover.Tests/AltCover.Tests.fsproj index ce7b18b43..890d0c3ad 100644 --- a/AltCover.Tests/AltCover.Tests.fsproj +++ b/AltCover.Tests/AltCover.Tests.fsproj @@ -40,7 +40,7 @@ - + diff --git a/AltCover.Tests/Runner.Tests.fs b/AltCover.Tests/Runner.Tests.fs index 91b6491c8..7eb938a90 100644 --- a/AltCover.Tests/Runner.Tests.fs +++ b/AltCover.Tests/Runner.Tests.fs @@ -910,7 +910,7 @@ module AltCoverRunnerTests = Assembly .GetExecutingAssembly() .GetManifestResourceNames() - |> Seq.find _.EndsWith("AltCover.targets", StringComparison.Ordinal) + |> Seq.find _.EndsWith("AltCover.proj", StringComparison.Ordinal) use stream = Assembly diff --git a/AltCover.Tests/Tests.fs b/AltCover.Tests/Tests.fs index c95e0fc6d..cb6a4af32 100644 --- a/AltCover.Tests/Tests.fs +++ b/AltCover.Tests/Tests.fs @@ -301,11 +301,18 @@ module AltCoverTests = let ShouldGetForeignPdbWithFallback () = let path = Path.Combine(SolutionDir(), "packages") + + let exclude = Path.Combine(path, "altcover") + // Looking for the Mono.Options symbols let files = Directory.GetFiles(path, "*.pdb", SearchOption.AllDirectories) files + |> Seq.filter ( + _.StartsWith(exclude, StringComparison.OrdinalIgnoreCase) + >> not + ) |> Seq.filter (fun p -> Path.ChangeExtension(p, ".dll") |> File.Exists) |> Seq.iter (fun p -> let dll = Path.ChangeExtension(p, ".dll") @@ -321,6 +328,8 @@ module AltCoverTests = match pdb with | Some name -> Assert.That(name, Is.EqualTo normalized) + //| _ -> + // raise <| InvalidOperationException((sprintf "%A for %A" dll normalized)) with :? BadImageFormatException -> ()) @@ -332,11 +341,18 @@ module AltCoverTests = let path = Path.Combine(SolutionDir(), "packages") + + let exclude = Path.Combine(path, "altcover") + // Looking for the Mono.Options symbols let files = Directory.GetFiles(path, "*.pdb", SearchOption.AllDirectories) files + |> Seq.filter ( + _.StartsWith(exclude, StringComparison.OrdinalIgnoreCase) + >> not + ) |> Seq.filter (fun p -> Path.ChangeExtension(p, ".dll") |> File.Exists) |> Seq.iter (fun p -> let dll0 = Path.ChangeExtension(p, ".dll") @@ -371,6 +387,8 @@ module AltCoverTests = Assert.That(name, Is.EqualTo normalized) AltCover.ProgramDatabase.readSymbols def Assert.That(def.MainModule.HasSymbols, def.MainModule.FileName) + //| _ -> + // raise <| InvalidOperationException((sprintf "%A for %A" dll normalized)) with :? BadImageFormatException -> ()) finally diff --git a/AltCover.Tests/Tests3.fs b/AltCover.Tests/Tests3.fs index e91390475..565810e88 100644 --- a/AltCover.Tests/Tests3.fs +++ b/AltCover.Tests/Tests3.fs @@ -203,7 +203,7 @@ module AltCoverTests3 = Assembly .GetExecutingAssembly() .GetManifestResourceNames() - |> Seq.find _.EndsWith("AltCover.targets", StringComparison.Ordinal) + |> Seq.find _.EndsWith("AltCover.proj", StringComparison.Ordinal) use stream = Assembly @@ -4899,6 +4899,23 @@ module AltCoverTests3 = monitor ("Hello") test <@ builder.ToString() = "Hello" @> + let write0 = + subject + .GetType() + .GetMethod("Write0", BindingFlags.NonPublic ||| BindingFlags.Instance) + + let mutable written = "written" + + write0.Invoke( + subject, + [| (fun x -> written <- x) + "xx" + "yy" |] + ) + |> ignore + + test <@ written = "Failed to delete file xx" @> + let write = subject .GetType() @@ -4906,7 +4923,7 @@ module AltCoverTests3 = let ex = Assert.Throws(fun () -> - write.Invoke(subject, [| "xx" |]) |> ignore) + write.Invoke(subject, [| "xx"; "yy" |]) |> ignore) test <@ ex.InnerException.GetType().FullName = "System.InvalidOperationException" @> // Recorder.fs => Recorder.Tests \ No newline at end of file diff --git a/AltCover.Toolkit/AltCover.Toolkit.fsproj b/AltCover.Toolkit/AltCover.Toolkit.fsproj index e9760e77b..3e256b994 100644 --- a/AltCover.Toolkit/AltCover.Toolkit.fsproj +++ b/AltCover.Toolkit/AltCover.Toolkit.fsproj @@ -50,19 +50,16 @@ - ..\ThirdParty\cecil\Mono.Cecil.dll - - - ..\ThirdParty\cecil\Mono.Cecil.Rocks.dll + $(MSBuildThisFileDirectory)\..\ThirdParty\cecil\Mono.Cecil.dll - ..\ThirdParty\cecil\Mono.Cecil.Mdb.dll + $(MSBuildThisFileDirectory)\..\ThirdParty\cecil\Mono.Cecil.Mdb.dll - ..\ThirdParty\cecil\Mono.Cecil.Pdb.dll + $(MSBuildThisFileDirectory)\..\ThirdParty\cecil\Mono.Cecil.Pdb.dll - - ..\ThirdParty\Unquote.dll + + $(MSBuildThisFileDirectory)\..\ThirdParty\cecil\Mono.Cecil.Rocks.dll diff --git a/AltCover.ValidateGendarmeEmulation/AltCover.ValidateGendarmeEmulation.fsproj b/AltCover.ValidateGendarmeEmulation/AltCover.ValidateGendarmeEmulation.fsproj index 3568ba5e4..3e7f0419d 100644 --- a/AltCover.ValidateGendarmeEmulation/AltCover.ValidateGendarmeEmulation.fsproj +++ b/AltCover.ValidateGendarmeEmulation/AltCover.ValidateGendarmeEmulation.fsproj @@ -27,16 +27,16 @@ - ..\ThirdParty\cecil\Mono.Cecil.dll - - - ..\ThirdParty\cecil\Mono.Cecil.Rocks.dll + $(SolutionDir)\ThirdParty\cecil\Mono.Cecil.dll - ..\ThirdParty\cecil\Mono.Cecil.Mdb.dll + $(SolutionDir)\ThirdParty\cecil\Mono.Cecil.Mdb.dll - ..\ThirdParty\cecil\Mono.Cecil.Pdb.dll + $(SolutionDir)\ThirdParty\cecil\Mono.Cecil.Pdb.dll + + + $(SolutionDir)\ThirdParty\cecil\Mono.Cecil.Rocks.dll ..\ThirdParty\Unquote.dll diff --git a/AltCover.sln b/AltCover.sln index 462f11909..222e0b983 100644 --- a/AltCover.sln +++ b/AltCover.sln @@ -38,6 +38,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build Items", "Build Items" Build\actions.fs = Build\actions.fs Build\AddStrongName.fsx = Build\AddStrongName.fsx Build\AltCover.nuspec = Build\AltCover.nuspec + nupkg\build\AltCover.proj = nupkg\build\AltCover.proj nupkg\build\AltCover.props = nupkg\build\AltCover.props nupkg\build\AltCover.targets = nupkg\build\AltCover.targets Build\Apply-Xslt.ps1 = Build\Apply-Xslt.ps1 @@ -122,6 +123,18 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Sample27", "Samples\Sample2 EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Sample30", "Samples\Sample30\Sample30.fsproj", "{B42E9FBA-BDE8-4B15-B7E7-DDF237CA7881}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Cecil", "Cecil", "{F56DE54A-ABD6-42F7-B61E-7BAFCCF2D787}" + ProjectSection(SolutionItems) = preProject + ThirdParty\cecil\Mono.Cecil.dll = ThirdParty\cecil\Mono.Cecil.dll + ThirdParty\cecil\Mono.Cecil.Mdb.dll = ThirdParty\cecil\Mono.Cecil.Mdb.dll + ThirdParty\cecil\Mono.Cecil.Mdb.pdb = ThirdParty\cecil\Mono.Cecil.Mdb.pdb + ThirdParty\cecil\Mono.Cecil.pdb = ThirdParty\cecil\Mono.Cecil.pdb + ThirdParty\cecil\Mono.Cecil.Pdb.dll = ThirdParty\cecil\Mono.Cecil.Pdb.dll + ThirdParty\cecil\Mono.Cecil.Pdb.pdb = ThirdParty\cecil\Mono.Cecil.Pdb.pdb + ThirdParty\cecil\Mono.Cecil.Rocks.dll = ThirdParty\cecil\Mono.Cecil.Rocks.dll + ThirdParty\cecil\Mono.Cecil.Rocks.pdb = ThirdParty\cecil\Mono.Cecil.Rocks.pdb + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -341,6 +354,7 @@ Global {B1A78802-5C8E-4C3C-AA66-1D2EB72BFE07} = {2837CE07-B91F-4B8A-89B5-E7BE39A8F340} {10FB27A2-9C4D-474D-A3B9-1C554038AA7E} = {2837CE07-B91F-4B8A-89B5-E7BE39A8F340} {B42E9FBA-BDE8-4B15-B7E7-DDF237CA7881} = {2837CE07-B91F-4B8A-89B5-E7BE39A8F340} + {F56DE54A-ABD6-42F7-B61E-7BAFCCF2D787} = {97367D43-64EF-48E1-B6B4-D951C783E6E1} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C31111CF-68A2-403F-9B06-9625FCBD48E3} diff --git a/Directory.Packages.props b/Directory.Packages.props index 3de35cd12..31bd60a82 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -21,7 +21,7 @@ - + diff --git a/RegressionTesting/issue156/Tests/Tests.csproj b/RegressionTesting/issue156/Tests/Tests.csproj index 626451ff4..878645626 100644 --- a/RegressionTesting/issue156/Tests/Tests.csproj +++ b/RegressionTesting/issue156/Tests/Tests.csproj @@ -16,6 +16,7 @@ + diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 5c52b65c5..045a62faa 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -3,9 +3,15 @@ A. Start with the Quick Start guide : https://github.com/SteveGilham/altcover/wiki/QuickStart-Guide and read the FAQ : https://github.com/SteveGilham/altcover/wiki/FAQ -# (Habu series release 27) +# (Habu series release 28) +* [BREAKING; BUGFIX] Issue #206 : Update to net6+ for `dotnet test` integration and respect the `$(IsTestProject)` setting from the `Microsoft.NET.Test.Sdk` package. +* Simplify the use of the AltCover MSBuild tasks via the associated package-level `.targets` file by not even including the `VSTest` integration unless both `'$(AltCover)' == 'true' AND '$(IsTestProject)' == 'true'`. +* Mitigate instances of `System.IO.IOException: The process cannot access the file '[coverage report]' because it is being used by another process.` +* Explicitly add GAC locations to the paths inspected for dependency resolution + +# 8.8.10 (Habu series release 27) * [BUGFIX] Add `Json` member to the report format enumerations for the typesafe API and for the `InvokeAltCover` cmdlet. -* [BUGFIX] Issue #214 - patch Mono.Cecil to use FIPS compliant algorithm +* [BUGFIX] Issue #214 : patch Mono.Cecil to use FIPS compliant algorithm * [Enhancement] Discussion #206, maybe also Issue #203 : Option `--portable` and equivalent APIs to place the coverage report file and related coverage data in the same folder as the recorder assembly, wherever that might be, allowing the whole instrumented folder structure to be moved into another file structure (e.g. different machine, different OS). # 8.7.3 (Habu series release 26) diff --git a/Samples/Sample3/Sample3.csproj b/Samples/Sample3/Sample3.csproj index e3643c89f..4202d3514 100644 --- a/Samples/Sample3/Sample3.csproj +++ b/Samples/Sample3/Sample3.csproj @@ -16,7 +16,19 @@ - + + + $(SolutionDir)\ThirdParty\cecil\Mono.Cecil.dll + + + $(SolutionDir)\ThirdParty\cecil\Mono.Cecil.Mdb.dll + + + $(SolutionDir)\ThirdParty\cecil\Mono.Cecil.Pdb.dll + + + $(SolutionDir)\ThirdParty\cecil\Mono.Cecil.Rocks.dll + \ No newline at end of file diff --git a/Samples/Sample7/Library.fs b/Samples/Sample7/Library.fs index bb91fba47..46ad7da61 100644 --- a/Samples/Sample7/Library.fs +++ b/Samples/Sample7/Library.fs @@ -52,9 +52,9 @@ module Problematic = for row = 0 to g.Height do for col = 0 to g.Width do - Assert.AreEqual( + Assert.That( System.Drawing.Rectangle(col, row, col, row), - g.Rectangle(col, row) + Is.EqualTo(g.Rectangle(col, row)) ) [] @@ -64,9 +64,9 @@ module Problematic = for row = 0 to g.Height do for col = 0 to g.Width do - Assert.AreEqual( + Assert.That( System.Drawing.Rectangle(col, row, col, row), - g.Rectangle(col, row) + Is.EqualTo(g.Rectangle(col, row)) ) finally System.Console.WriteLine("Finally") diff --git a/Samples/Sample7/Sample7.fsproj b/Samples/Sample7/Sample7.fsproj index 569337519..f3564be99 100644 --- a/Samples/Sample7/Sample7.fsproj +++ b/Samples/Sample7/Sample7.fsproj @@ -11,8 +11,8 @@ - - + + all diff --git a/ThirdParty/cecil/Mono.Cecil.pdb b/ThirdParty/cecil/Mono.Cecil.pdb deleted file mode 100644 index 16e9b4140..000000000 Binary files a/ThirdParty/cecil/Mono.Cecil.pdb and /dev/null differ diff --git a/docs/AltCover.Cake/AltCover.Cake/PrepareOptions-apidoc.md b/docs/AltCover.Cake/AltCover.Cake/PrepareOptions-apidoc.md index 152157a26..28aead392 100644 --- a/docs/AltCover.Cake/AltCover.Cake/PrepareOptions-apidoc.md +++ b/docs/AltCover.Cake/AltCover.Cake/PrepareOptions-apidoc.md @@ -33,6 +33,7 @@ public class PrepareOptions | [OutputDirectories](PrepareOptions/OutputDirectories-apidoc) { get; } | Gets the output directories (overridden by the MSBuild integration) | | virtual [OutputRoot](PrepareOptions/OutputRoot-apidoc) { get; } | Corresponds to dotnet test option `/p:AltCoverOutputRoot` | | virtual [PathFilter](PrepareOptions/PathFilter-apidoc) { get; } | Corresponds to command line option `-p, --pathFilter=VALUE` | +| virtual [Portable](PrepareOptions/Portable-apidoc) { get; } | Corresponds to command line option `--portable` | | virtual [Report](PrepareOptions/Report-apidoc) { get; } | Gets or sets the value that corresponds to command line option `-r, --report=VALUE` | | virtual [ReportFormat](PrepareOptions/ReportFormat-apidoc) { get; } | Corresponds to command line option `--reportFormat=VALUE` | | virtual [Save](PrepareOptions/Save-apidoc) { get; } | Corresponds to command line option `--save` | diff --git a/docs/AltCover.Cake/AltCover.Cake/PrepareOptions/Portable-apidoc.md b/docs/AltCover.Cake/AltCover.Cake/PrepareOptions/Portable-apidoc.md new file mode 100644 index 000000000..c0bbff9f8 --- /dev/null +++ b/docs/AltCover.Cake/AltCover.Cake/PrepareOptions/Portable-apidoc.md @@ -0,0 +1,14 @@ +# PrepareOptions.Portable property + +Corresponds to command line option `--portable` + +```csharp +public virtual bool Portable { get; } +``` + +## See Also + +* class [PrepareOptions](../PrepareOptions-apidoc) +* namespace [AltCover.Cake](../../AltCover.Cake-apidoc) + + diff --git a/docs/AltCover.DotNet/AltCover/Options.Prepare-apidoc.md b/docs/AltCover.DotNet/AltCover/Options.Prepare-apidoc.md index b255a9663..8e2fc14c7 100644 --- a/docs/AltCover.DotNet/AltCover/Options.Prepare-apidoc.md +++ b/docs/AltCover.DotNet/AltCover/Options.Prepare-apidoc.md @@ -31,6 +31,7 @@ public class Prepare | [OutputDirectories](Options.Prepare/OutputDirectories-apidoc) { get; set; } | | | [OutputRoot](Options.Prepare/OutputRoot-apidoc) { get; set; } | | | [PathFilter](Options.Prepare/PathFilter-apidoc) { get; set; } | | +| [Portable](Options.Prepare/Portable-apidoc) { get; set; } | | | [Report](Options.Prepare/Report-apidoc) { get; set; } | | | [ReportFormat](Options.Prepare/ReportFormat-apidoc) { get; set; } | | | [Save](Options.Prepare/Save-apidoc) { get; set; } | | diff --git a/docs/AltCover.DotNet/AltCover/Options.Prepare/Portable-apidoc.md b/docs/AltCover.DotNet/AltCover/Options.Prepare/Portable-apidoc.md new file mode 100644 index 000000000..47c8149e6 --- /dev/null +++ b/docs/AltCover.DotNet/AltCover/Options.Prepare/Portable-apidoc.md @@ -0,0 +1,12 @@ +# Options.Prepare.Portable property + +```csharp +public bool Portable { get; set; } +``` + +## See Also + +* class [Prepare](../Options.Prepare-apidoc) +* namespace [AltCover](../../AltCover.DotNet-apidoc) + + diff --git a/docs/AltCover.Engine/Abstract-fsapidoc.md b/docs/AltCover.Engine/Abstract-fsapidoc.md index 9d47125e9..5829a372f 100644 --- a/docs/AltCover.Engine/Abstract-fsapidoc.md +++ b/docs/AltCover.Engine/Abstract-fsapidoc.md @@ -86,6 +86,7 @@ The members correspond to the like-named command line options for `AltCover`, ex abstract member Verbosity : System.Diagnostics.TraceLevel with get abstract member Trivia : bool with get abstract member OutputRoot : string with get + abstract member Portable : bool with get ``` ### interface `ILoggingOptions` diff --git a/docs/AltCover.Engine/AltCover-fsapidoc.md b/docs/AltCover.Engine/AltCover-fsapidoc.md index df43d1ecc..e20c5931f 100644 --- a/docs/AltCover.Engine/AltCover-fsapidoc.md +++ b/docs/AltCover.Engine/AltCover-fsapidoc.md @@ -129,6 +129,7 @@ The members correspond to the like-named command line options for `AltCover`, ex member Verbosity : System.Diagnostics.TraceLevel member Trivia: bool with get member OutputRoot : string with get + member Portable : bool with get ``` ``` diff --git a/docs/AltCover.Engine/AltCover/Abstract.IPrepareOptions-apidoc.md b/docs/AltCover.Engine/AltCover/Abstract.IPrepareOptions-apidoc.md index 7659e3c10..61a928e42 100644 --- a/docs/AltCover.Engine/AltCover/Abstract.IPrepareOptions-apidoc.md +++ b/docs/AltCover.Engine/AltCover/Abstract.IPrepareOptions-apidoc.md @@ -46,6 +46,7 @@ public interface IPrepareOptions | [OutputDirectories](Abstract.IPrepareOptions/OutputDirectories-apidoc) { get; } | Corresponds to command line option `-o, --outputDirectory=VALUE` | | [OutputRoot](Abstract.IPrepareOptions/OutputRoot-apidoc) { get; } | Corresponds to dotnet test option `/p:AltCoverOutputRoot` | | [PathFilter](Abstract.IPrepareOptions/PathFilter-apidoc) { get; } | Corresponds to command line option `-p, --pathFilter=VALUE` | +| [Portable](Abstract.IPrepareOptions/Portable-apidoc) { get; } | Corresponds to command line option `--portable` | | [Report](Abstract.IPrepareOptions/Report-apidoc) { get; } | Corresponds to command line option `-r, --report=VALUE` | | [ReportFormat](Abstract.IPrepareOptions/ReportFormat-apidoc) { get; } | Corresponds to command line option `--reportFormat=VALUE` | | [Save](Abstract.IPrepareOptions/Save-apidoc) { get; } | Corresponds to command line option `--save` | diff --git a/docs/AltCover.Engine/AltCover/Abstract.IPrepareOptions/Portable-apidoc.md b/docs/AltCover.Engine/AltCover/Abstract.IPrepareOptions/Portable-apidoc.md new file mode 100644 index 000000000..26a46201f --- /dev/null +++ b/docs/AltCover.Engine/AltCover/Abstract.IPrepareOptions/Portable-apidoc.md @@ -0,0 +1,14 @@ +# Abstract.IPrepareOptions.Portable property + +Corresponds to command line option `--portable` + +```csharp +public bool Portable { get; } +``` + +## See Also + +* interface [IPrepareOptions](../Abstract.IPrepareOptions-apidoc) +* namespace [AltCover](../../AltCover.Engine-apidoc) + + diff --git a/docs/AltCover.Engine/AltCover/AltCover.PrepareOptions-apidoc.md b/docs/AltCover.Engine/AltCover/AltCover.PrepareOptions-apidoc.md index f508c83cb..fa0d16d8b 100644 --- a/docs/AltCover.Engine/AltCover/AltCover.PrepareOptions-apidoc.md +++ b/docs/AltCover.Engine/AltCover/AltCover.PrepareOptions-apidoc.md @@ -35,6 +35,7 @@ public abstract class PrepareOptions : IEquatable, IStructuralEq | [OutputDirectories](AltCover.PrepareOptions/OutputDirectories-apidoc) { get; } | Corresponds to command line option `-o, --outputDirectory=VALUE` | | [OutputRoot](AltCover.PrepareOptions/OutputRoot-apidoc) { get; } | Corresponds to dotnet test option `/p:AltCoverOutputRoot` | | [PathFilter](AltCover.PrepareOptions/PathFilter-apidoc) { get; } | Corresponds to command line option `-p, --pathFilter=VALUE` | +| [Portable](AltCover.PrepareOptions/Portable-apidoc) { get; } | Corresponds to command line option `--portable` | | [Report](AltCover.PrepareOptions/Report-apidoc) { get; } | Corresponds to command line option `-r, --report=VALUE` | | [ReportFormat](AltCover.PrepareOptions/ReportFormat-apidoc) { get; } | Corresponds to command line option `--reportFormat=VALUE` | | [Save](AltCover.PrepareOptions/Save-apidoc) { get; } | Corresponds to command line option `--save` | diff --git a/docs/AltCover.Engine/AltCover/AltCover.PrepareOptions/Portable-apidoc.md b/docs/AltCover.Engine/AltCover/AltCover.PrepareOptions/Portable-apidoc.md new file mode 100644 index 000000000..f3d673c57 --- /dev/null +++ b/docs/AltCover.Engine/AltCover/AltCover.PrepareOptions/Portable-apidoc.md @@ -0,0 +1,14 @@ +# AltCover.PrepareOptions.Portable property + +Corresponds to command line option `--portable` + +```csharp +public bool Portable { get; } +``` + +## See Also + +* class [PrepareOptions](../AltCover.PrepareOptions-apidoc) +* namespace [AltCover](../../AltCover.Engine-apidoc) + + diff --git a/docs/AltCover.Engine/AltCover/Prepare-apidoc.md b/docs/AltCover.Engine/AltCover/Prepare-apidoc.md index 1b71ed310..9b545490f 100644 --- a/docs/AltCover.Engine/AltCover/Prepare-apidoc.md +++ b/docs/AltCover.Engine/AltCover/Prepare-apidoc.md @@ -32,6 +32,7 @@ public class Prepare : Task | [MethodTopLevel](Prepare/MethodTopLevel-apidoc) { get; set; } | Corresponds to command line option `--methodtoplevel=VALUE` | | [OutputDirectories](Prepare/OutputDirectories-apidoc) { get; set; } | Corresponds to command line option `-o, --outputDirectory=VALUE` | | [PathFilter](Prepare/PathFilter-apidoc) { get; set; } | Corresponds to command line option `-p, --pathFilter=VALUE` | +| [Portable](Prepare/Portable-apidoc) { get; set; } | Corresponds to command line option `--portable` | | [Report](Prepare/Report-apidoc) { get; set; } | Corresponds to command line option `-r, --report=VALUE` | | [ReportFormat](Prepare/ReportFormat-apidoc) { get; set; } | Corresponds to command line option `--reportFormat=VALUE` | | [Save](Prepare/Save-apidoc) { get; set; } | Corresponds to command line option `--save` | diff --git a/docs/AltCover.Engine/AltCover/Prepare/Portable-apidoc.md b/docs/AltCover.Engine/AltCover/Prepare/Portable-apidoc.md new file mode 100644 index 000000000..215375809 --- /dev/null +++ b/docs/AltCover.Engine/AltCover/Prepare/Portable-apidoc.md @@ -0,0 +1,14 @@ +# Prepare.Portable property + +Corresponds to command line option `--portable` + +```csharp +public bool Portable { get; set; } +``` + +## See Also + +* class [Prepare](../Prepare-apidoc) +* namespace [AltCover](../../AltCover.Engine-apidoc) + + diff --git a/docs/AltCover.Engine/AltCover/Primitive.PrepareOptions-apidoc.md b/docs/AltCover.Engine/AltCover/Primitive.PrepareOptions-apidoc.md index 97285c8c7..daf3e9330 100644 --- a/docs/AltCover.Engine/AltCover/Primitive.PrepareOptions-apidoc.md +++ b/docs/AltCover.Engine/AltCover/Primitive.PrepareOptions-apidoc.md @@ -34,6 +34,7 @@ public sealed class PrepareOptions : IEquatable, IStructuralEqua | [OutputDirectories](Primitive.PrepareOptions/OutputDirectories-apidoc) { get; } | Corresponds to command line option `-o, --outputDirectory=VALUE` | | [OutputRoot](Primitive.PrepareOptions/OutputRoot-apidoc) { get; } | Corresponds to dotnet test option `/p:AltCoverOutputRoot` | | [PathFilter](Primitive.PrepareOptions/PathFilter-apidoc) { get; } | Corresponds to command line option `-p, --pathFilter=VALUE` | +| [Portable](Primitive.PrepareOptions/Portable-apidoc) { get; } | Corresponds to command line option `--portable` | | [Report](Primitive.PrepareOptions/Report-apidoc) { get; } | Corresponds to command line option `-r, --report=VALUE` | | [ReportFormat](Primitive.PrepareOptions/ReportFormat-apidoc) { get; } | Corresponds to command line option `--reportFormat=VALUE` | | [Save](Primitive.PrepareOptions/Save-apidoc) { get; } | Corresponds to command line option `--save` | diff --git a/docs/AltCover.Engine/AltCover/Primitive.PrepareOptions/Portable-apidoc.md b/docs/AltCover.Engine/AltCover/Primitive.PrepareOptions/Portable-apidoc.md new file mode 100644 index 000000000..e6b789d29 --- /dev/null +++ b/docs/AltCover.Engine/AltCover/Primitive.PrepareOptions/Portable-apidoc.md @@ -0,0 +1,14 @@ +# Primitive.PrepareOptions.Portable property + +Corresponds to command line option `--portable` + +```csharp +public bool Portable { get; } +``` + +## See Also + +* class [PrepareOptions](../Primitive.PrepareOptions-apidoc) +* namespace [AltCover](../../AltCover.Engine-apidoc) + + diff --git a/docs/AltCover.Engine/AltCover/Primitive.PrepareOptions/PrepareOptions-apidoc.md b/docs/AltCover.Engine/AltCover/Primitive.PrepareOptions/PrepareOptions-apidoc.md index a266af370..7b42255dd 100644 --- a/docs/AltCover.Engine/AltCover/Primitive.PrepareOptions/PrepareOptions-apidoc.md +++ b/docs/AltCover.Engine/AltCover/Primitive.PrepareOptions/PrepareOptions-apidoc.md @@ -12,7 +12,7 @@ public PrepareOptions(IEnumerable inputDirectories, IEnumerable bool inPlace, bool save, bool zipFile, bool methodPoint, bool singleVisit, bool lineCover, bool branchCover, IEnumerable commandLine, bool exposeReturnCode, bool sourceLink, bool defer, bool localSource, bool visibleBranches, string showStatic, bool showGenerated, - TraceLevel verbosity, bool trivia, string outputRoot) + TraceLevel verbosity, bool trivia, string outputRoot, bool portable) ``` ## See Also diff --git a/docs/AltCover.Engine/AltCover/TypeSafe.PrepareOptions-apidoc.md b/docs/AltCover.Engine/AltCover/TypeSafe.PrepareOptions-apidoc.md index 8785a1e47..b18be2f88 100644 --- a/docs/AltCover.Engine/AltCover/TypeSafe.PrepareOptions-apidoc.md +++ b/docs/AltCover.Engine/AltCover/TypeSafe.PrepareOptions-apidoc.md @@ -34,6 +34,7 @@ public sealed class PrepareOptions : IEquatable, IStructuralEqua | [OutputDirectories](TypeSafe.PrepareOptions/OutputDirectories-apidoc) { get; } | Corresponds to command line option `-o, --outputDirectory=VALUE` | | [OutputRoot](TypeSafe.PrepareOptions/OutputRoot-apidoc) { get; } | Corresponds to dotnet test option `/p:AltCoverOutputRoot` | | [PathFilter](TypeSafe.PrepareOptions/PathFilter-apidoc) { get; } | Corresponds to command line option `-p, --pathFilter=VALUE` | +| [Portable](TypeSafe.PrepareOptions/Portable-apidoc) { get; } | Corresponds to command line option `--portable` | | [Report](TypeSafe.PrepareOptions/Report-apidoc) { get; } | Corresponds to command line option `-r, --report=VALUE` | | [ReportFormat](TypeSafe.PrepareOptions/ReportFormat-apidoc) { get; } | Corresponds to command line option `--reportFormat=VALUE` | | [Save](TypeSafe.PrepareOptions/Save-apidoc) { get; } | Corresponds to command line option `--save` | diff --git a/docs/AltCover.Engine/AltCover/TypeSafe.PrepareOptions/Portable-apidoc.md b/docs/AltCover.Engine/AltCover/TypeSafe.PrepareOptions/Portable-apidoc.md new file mode 100644 index 000000000..a10736033 --- /dev/null +++ b/docs/AltCover.Engine/AltCover/TypeSafe.PrepareOptions/Portable-apidoc.md @@ -0,0 +1,15 @@ +# TypeSafe.PrepareOptions.Portable property + +Corresponds to command line option `--portable` + +```csharp +public Flag Portable { get; } +``` + +## See Also + +* class [Flag](../TypeSafe.Flag-apidoc) +* class [PrepareOptions](../TypeSafe.PrepareOptions-apidoc) +* namespace [AltCover](../../AltCover.Engine-apidoc) + + diff --git a/docs/AltCover.Engine/AltCover/TypeSafe.PrepareOptions/PrepareOptions-apidoc.md b/docs/AltCover.Engine/AltCover/TypeSafe.PrepareOptions/PrepareOptions-apidoc.md index 1f801cfe3..b0059142a 100644 --- a/docs/AltCover.Engine/AltCover/TypeSafe.PrepareOptions/PrepareOptions-apidoc.md +++ b/docs/AltCover.Engine/AltCover/TypeSafe.PrepareOptions/PrepareOptions-apidoc.md @@ -10,7 +10,7 @@ public PrepareOptions(DirectoryPaths inputDirectories, DirectoryPaths outputDire Flag save, Flag zipFile, Flag methodPoint, Flag singleVisit, Flag lineCover, Flag branchCover, CommandLine commandLine, Flag exposeReturnCode, Flag sourceLink, Flag defer, Flag localSource, Flag visibleBranches, StaticFormat showStatic, Flag showGenerated, TraceLevel verbosity, - Flag trivia, FilePath outputRoot) + Flag trivia, FilePath outputRoot, Flag portable) ``` ## See Also diff --git a/docs/AltCover.Engine/AltCover/TypeSafe.ReportFormat-apidoc.md b/docs/AltCover.Engine/AltCover/TypeSafe.ReportFormat-apidoc.md index bf8912a6a..4025cd175 100644 --- a/docs/AltCover.Engine/AltCover/TypeSafe.ReportFormat-apidoc.md +++ b/docs/AltCover.Engine/AltCover/TypeSafe.ReportFormat-apidoc.md @@ -10,6 +10,7 @@ public sealed class ReportFormat : IEquatable, IStructuralEquatabl | name | description | | --- | --- | +| static [get_Json](TypeSafe.ReportFormat/get_Json-apidoc)() | | | static [get_NCover](TypeSafe.ReportFormat/get_NCover-apidoc)() | | | static [get_OpenCover](TypeSafe.ReportFormat/get_OpenCover-apidoc)() | | | [AsString](TypeSafe.ReportFormat/AsString-apidoc)() | Returns the string to use in the command line | diff --git a/docs/AltCover.Engine/AltCover/TypeSafe.ReportFormat.Tags-apidoc.md b/docs/AltCover.Engine/AltCover/TypeSafe.ReportFormat.Tags-apidoc.md index f129412d5..3e44eb896 100644 --- a/docs/AltCover.Engine/AltCover/TypeSafe.ReportFormat.Tags-apidoc.md +++ b/docs/AltCover.Engine/AltCover/TypeSafe.ReportFormat.Tags-apidoc.md @@ -8,6 +8,7 @@ public static class Tags | name | description | | --- | --- | +| const [Json](TypeSafe.ReportFormat.Tags/Json-apidoc) | | | const [NCover](TypeSafe.ReportFormat.Tags/NCover-apidoc) | | | const [OpenCover](TypeSafe.ReportFormat.Tags/OpenCover-apidoc) | | diff --git a/docs/AltCover.Engine/AltCover/TypeSafe.ReportFormat.Tags/Json-apidoc.md b/docs/AltCover.Engine/AltCover/TypeSafe.ReportFormat.Tags/Json-apidoc.md new file mode 100644 index 000000000..832ce3f36 --- /dev/null +++ b/docs/AltCover.Engine/AltCover/TypeSafe.ReportFormat.Tags/Json-apidoc.md @@ -0,0 +1,12 @@ +# TypeSafe.ReportFormat.Tags.Json field + +```csharp +public const int Json; +``` + +## See Also + +* class [Tags](../TypeSafe.ReportFormat.Tags-apidoc) +* namespace [AltCover](../../AltCover.Engine-apidoc) + + diff --git a/docs/AltCover.Engine/AltCover/TypeSafe.ReportFormat/get_Json-apidoc.md b/docs/AltCover.Engine/AltCover/TypeSafe.ReportFormat/get_Json-apidoc.md new file mode 100644 index 000000000..ef7d2b36e --- /dev/null +++ b/docs/AltCover.Engine/AltCover/TypeSafe.ReportFormat/get_Json-apidoc.md @@ -0,0 +1,12 @@ +# TypeSafe.ReportFormat.get_Json method + +```csharp +public static ReportFormat get_Json() +``` + +## See Also + +* class [ReportFormat](../TypeSafe.ReportFormat-apidoc) +* namespace [AltCover](../../AltCover.Engine-apidoc) + + diff --git a/docs/AltCover.Engine/Primitive-fsapidoc.md b/docs/AltCover.Engine/Primitive-fsapidoc.md index 3293becd5..e51a65c74 100644 --- a/docs/AltCover.Engine/Primitive-fsapidoc.md +++ b/docs/AltCover.Engine/Primitive-fsapidoc.md @@ -98,6 +98,7 @@ The members correspond to the like-named command line options for `AltCover`, ex Verbosity : System.Diagnostics.TraceLevel Trivia: bool OutputRoot : string + Portable : bool } with static member Create : unit -> PrepareOptions diff --git a/docs/AltCover.Engine/Tasks-fsapidoc.md b/docs/AltCover.Engine/Tasks-fsapidoc.md index 6645b91b0..eb7a07880 100644 --- a/docs/AltCover.Engine/Tasks-fsapidoc.md +++ b/docs/AltCover.Engine/Tasks-fsapidoc.md @@ -55,6 +55,7 @@ type Prepare = member ShowGenerated : bool with get, set member Verbosity : string with get, set member Trivia: bool with get, set + member Portable: bool with get, set end ``` ## Task `AltCover.Collect` diff --git a/docs/AltCover.Engine/TypeSafe-fsapidoc.md b/docs/AltCover.Engine/TypeSafe-fsapidoc.md index a522765ce..94027c493 100644 --- a/docs/AltCover.Engine/TypeSafe-fsapidoc.md +++ b/docs/AltCover.Engine/TypeSafe-fsapidoc.md @@ -172,6 +172,7 @@ This holds the strongly-typed equivalent of the command line options type ReportFormat = | NCover | OpenCover + | Json with member AsString : unit -> string end @@ -254,6 +255,7 @@ The members correspond to the like-named command line options for `AltCover`, ex Verbosity : System.Diagnostics.TraceLevel Trivia: Flag OutputRoot : FilePath + Portable : Flag } with static member Create : unit -> PrepareOptions diff --git a/docs/AltCover.Fake.DotNet.Testing.AltCover/Abstract-fsapidoc.md b/docs/AltCover.Fake.DotNet.Testing.AltCover/Abstract-fsapidoc.md index 6e58c9fc7..2f4dbaac5 100644 --- a/docs/AltCover.Fake.DotNet.Testing.AltCover/Abstract-fsapidoc.md +++ b/docs/AltCover.Fake.DotNet.Testing.AltCover/Abstract-fsapidoc.md @@ -86,6 +86,7 @@ The members correspond to the like-named command line options for `AltCover`, ex abstract member Verbosity : System.Diagnostics.TraceLevel with get abstract member Trivia : bool with get abstract member OutputRoot : string with get + abstract member Portable : bool with get ``` diff --git a/docs/AltCover.Fake.DotNet.Testing.AltCover/AltCover-fsapidoc.md b/docs/AltCover.Fake.DotNet.Testing.AltCover/AltCover-fsapidoc.md index 995c8bb92..9a1cfa14d 100644 --- a/docs/AltCover.Fake.DotNet.Testing.AltCover/AltCover-fsapidoc.md +++ b/docs/AltCover.Fake.DotNet.Testing.AltCover/AltCover-fsapidoc.md @@ -147,6 +147,7 @@ The members correspond to the like-named command line options for `AltCover`, ex member Verbosity : System.Diagnostics.TraceLevel member Trivia: bool with get member OutputRoot : string with get + member Portable : bool with get ``` diff --git a/docs/AltCover.Fake.DotNet.Testing.AltCover/Primitive-fsapidoc.md b/docs/AltCover.Fake.DotNet.Testing.AltCover/Primitive-fsapidoc.md index 0200e711d..ec143d25e 100644 --- a/docs/AltCover.Fake.DotNet.Testing.AltCover/Primitive-fsapidoc.md +++ b/docs/AltCover.Fake.DotNet.Testing.AltCover/Primitive-fsapidoc.md @@ -98,6 +98,7 @@ The members correspond to the like-named command line options for `AltCover`, ex Verbosity : System.Diagnostics.TraceLevel Trivia: bool OutputRoot : string + Portable : bool } with static member Create : unit -> PrepareOptions diff --git a/docs/AltCover.Fake.DotNet.Testing.AltCover/TypeSafe-fsapidoc.md b/docs/AltCover.Fake.DotNet.Testing.AltCover/TypeSafe-fsapidoc.md index 9eabdd187..68f59fa7f 100644 --- a/docs/AltCover.Fake.DotNet.Testing.AltCover/TypeSafe-fsapidoc.md +++ b/docs/AltCover.Fake.DotNet.Testing.AltCover/TypeSafe-fsapidoc.md @@ -172,6 +172,7 @@ This holds the strongly-typed equivalent of the command line options type ReportFormat = | NCover | OpenCover + | Json with member AsString : unit -> string end @@ -254,6 +255,7 @@ The members correspond to the like-named command line options for `AltCover`, ex Verbosity : System.Diagnostics.TraceLevel Trivia: Flag OutputRoot : FilePath + Portable : Flag } with static member Create : unit -> PrepareOptions diff --git a/docs/AltCover.PowerShell/AltCover.Commands/InvokeAltCoverCommand-apidoc.md b/docs/AltCover.PowerShell/AltCover.Commands/InvokeAltCoverCommand-apidoc.md index 24a8c5f4d..fdc0714e0 100644 --- a/docs/AltCover.PowerShell/AltCover.Commands/InvokeAltCoverCommand-apidoc.md +++ b/docs/AltCover.PowerShell/AltCover.Commands/InvokeAltCoverCommand-apidoc.md @@ -29,7 +29,7 @@ public class InvokeAltCoverCommand : PSCmdlet | [AssemblyFilter](InvokeAltCoverCommand/AssemblyFilter-apidoc) { get; set; } | Assembly names to exclude from instrumentation (linked by instrumented assemblies) | | [AttributeFilter](InvokeAltCoverCommand/AttributeFilter-apidoc) { get; set; } | Attribute names to exclude from instrumentation | | [AttributeTopLevel](InvokeAltCoverCommand/AttributeTopLevel-apidoc) { get; set; } | Attributes to mark a type as "top level" | -| [BranchCover](InvokeAltCoverCommand/BranchCover-apidoc) { get; set; } | Do not record line coverage. Implies, and is compatible with, the -ReportFormat "opencover" option. Incompatible with `-LineCover`. | +| [BranchCover](InvokeAltCoverCommand/BranchCover-apidoc) { get; set; } | Do not record line coverage. Is not compatible with the -ReportFormat "ncover" option. Incompatible with `-LineCover`. | | [CallContext](InvokeAltCoverCommand/CallContext-apidoc) { get; set; } | Tracking either times of visits in ticks or designated method calls leading to the visits. | | [Cobertura](InvokeAltCoverCommand/Cobertura-apidoc) { get; set; } | File path for Cobertura format version of the collected data | | [CommandLine](InvokeAltCoverCommand/CommandLine-apidoc) { get; set; } | Arguments for a launched process | @@ -42,7 +42,7 @@ public class InvokeAltCoverCommand : PSCmdlet | [InputDirectory](InvokeAltCoverCommand/InputDirectory-apidoc) { get; set; } | Folder or folders containing assemblies to instrument (default: current directory) | | [Key](InvokeAltCoverCommand/Key-apidoc) { get; set; } | Strong name key or keys that were used to sign the inputs | | [LcovReport](InvokeAltCoverCommand/LcovReport-apidoc) { get; set; } | File path for lcov format version of the collected data | -| [LineCover](InvokeAltCoverCommand/LineCover-apidoc) { get; set; } | Do not record branch coverage. Implies, and is compatible with, the -ReportFormat "opencover" option. Incompatible with `-BranchCover`. | +| [LineCover](InvokeAltCoverCommand/LineCover-apidoc) { get; set; } | Do not record branch coverage. Is not compatible with the -ReportFormat "ncover" option. Incompatible with `-BranchCover`. | | [LocalSource](InvokeAltCoverCommand/LocalSource-apidoc) { get; set; } | Don't instrument code for which the source file is not present. | | [MethodFilter](InvokeAltCoverCommand/MethodFilter-apidoc) { get; set; } | Method names to exclude from instrumentation | | [MethodPoint](InvokeAltCoverCommand/MethodPoint-apidoc) { get; set; } | Record only whether a method has been visited or not. Overrides the `-LineCover` and `-BranchCover` options. | @@ -50,9 +50,10 @@ public class InvokeAltCoverCommand : PSCmdlet | [OutputDirectory](InvokeAltCoverCommand/OutputDirectory-apidoc) { get; set; } | Folder or folders to receive the instrumented assemblies and their companions (default: sub-folder `__Instrumented` of the current directory; or `__Saved` if `-Inplace` is set). | | [OutputFile](InvokeAltCoverCommand/OutputFile-apidoc) { get; set; } | Write the recorded coverage to this file rather than overwriting the original report file. | | [PathFilter](InvokeAltCoverCommand/PathFilter-apidoc) { get; set; } | Source file paths to exclude from instrumentation | +| [Portable](InvokeAltCoverCommand/Portable-apidoc) { get; set; } | Portable operation - coverage report, control file and recorded data co-located with the recorder assembly | | [RecorderDirectory](InvokeAltCoverCommand/RecorderDirectory-apidoc) { get; set; } | The folder containing the instrumented code to monitor (including the `AltCover.Recorder.g.dll` generated by previous a use of the .net core `AltCover`). | | [Report](InvokeAltCoverCommand/Report-apidoc) { get; set; } | The output report template file (default: 'coverage.xml' or 'coverage.json' in the current directory) | -| [ReportFormat](InvokeAltCoverCommand/ReportFormat-apidoc) { get; set; } | Generate the report in the specified format (NCover or the default OpenCover) | +| [ReportFormat](InvokeAltCoverCommand/ReportFormat-apidoc) { get; set; } | Generate the report in the specified format (NCover, JSON or the default OpenCover) | | [Runner](InvokeAltCoverCommand/Runner-apidoc) { get; set; } | Selects `Runner` mode | | [Save](InvokeAltCoverCommand/Save-apidoc) { get; set; } | Write raw coverage data to file for later processing | | [ShowGenerated](InvokeAltCoverCommand/ShowGenerated-apidoc) { get; set; } | Mark generated code with a visit count of -2 (Automatic) for the Visualizer if unvisited | diff --git a/docs/AltCover.PowerShell/AltCover.Commands/InvokeAltCoverCommand/BranchCover-apidoc.md b/docs/AltCover.PowerShell/AltCover.Commands/InvokeAltCoverCommand/BranchCover-apidoc.md index ed721406d..0048b8e6e 100644 --- a/docs/AltCover.PowerShell/AltCover.Commands/InvokeAltCoverCommand/BranchCover-apidoc.md +++ b/docs/AltCover.PowerShell/AltCover.Commands/InvokeAltCoverCommand/BranchCover-apidoc.md @@ -1,6 +1,6 @@ # InvokeAltCoverCommand.BranchCover property -Do not record line coverage. Implies, and is compatible with, the -ReportFormat "opencover" option. Incompatible with `-LineCover`. +Do not record line coverage. Is not compatible with the -ReportFormat "ncover" option. Incompatible with `-LineCover`. ```csharp public SwitchParameter BranchCover { get; set; } diff --git a/docs/AltCover.PowerShell/AltCover.Commands/InvokeAltCoverCommand/LineCover-apidoc.md b/docs/AltCover.PowerShell/AltCover.Commands/InvokeAltCoverCommand/LineCover-apidoc.md index 0a0cbbc64..973e0ac82 100644 --- a/docs/AltCover.PowerShell/AltCover.Commands/InvokeAltCoverCommand/LineCover-apidoc.md +++ b/docs/AltCover.PowerShell/AltCover.Commands/InvokeAltCoverCommand/LineCover-apidoc.md @@ -1,6 +1,6 @@ # InvokeAltCoverCommand.LineCover property -Do not record branch coverage. Implies, and is compatible with, the -ReportFormat "opencover" option. Incompatible with `-BranchCover`. +Do not record branch coverage. Is not compatible with the -ReportFormat "ncover" option. Incompatible with `-BranchCover`. ```csharp public SwitchParameter LineCover { get; set; } diff --git a/docs/AltCover.PowerShell/AltCover.Commands/InvokeAltCoverCommand/Portable-apidoc.md b/docs/AltCover.PowerShell/AltCover.Commands/InvokeAltCoverCommand/Portable-apidoc.md new file mode 100644 index 000000000..d6acf7c47 --- /dev/null +++ b/docs/AltCover.PowerShell/AltCover.Commands/InvokeAltCoverCommand/Portable-apidoc.md @@ -0,0 +1,14 @@ +# InvokeAltCoverCommand.Portable property + +Portable operation - coverage report, control file and recorded data co-located with the recorder assembly + +```csharp +public SwitchParameter Portable { get; set; } +``` + +## See Also + +* class [InvokeAltCoverCommand](../InvokeAltCoverCommand-apidoc) +* namespace [AltCover.Commands](../../AltCover.PowerShell-apidoc) + + diff --git a/docs/AltCover.PowerShell/AltCover.Commands/InvokeAltCoverCommand/ReportFormat-apidoc.md b/docs/AltCover.PowerShell/AltCover.Commands/InvokeAltCoverCommand/ReportFormat-apidoc.md index 444aac164..48aef2292 100644 --- a/docs/AltCover.PowerShell/AltCover.Commands/InvokeAltCoverCommand/ReportFormat-apidoc.md +++ b/docs/AltCover.PowerShell/AltCover.Commands/InvokeAltCoverCommand/ReportFormat-apidoc.md @@ -1,6 +1,6 @@ # InvokeAltCoverCommand.ReportFormat property -Generate the report in the specified format (NCover or the default OpenCover) +Generate the report in the specified format (NCover, JSON or the default OpenCover) ```csharp public ReportFormat ReportFormat { get; set; } diff --git a/docs/AltCover.PowerShell/AltCover.Commands/ReportFormat-apidoc.md b/docs/AltCover.PowerShell/AltCover.Commands/ReportFormat-apidoc.md index 15a6b52b0..9f401dc46 100644 --- a/docs/AltCover.PowerShell/AltCover.Commands/ReportFormat-apidoc.md +++ b/docs/AltCover.PowerShell/AltCover.Commands/ReportFormat-apidoc.md @@ -12,6 +12,7 @@ public enum ReportFormat | --- | --- | --- | | NCover | `0` | Generate an NCover format report | | OpenCover | `1` | Generate an OpenCover format report | +| Json | `2` | Generate a JSON format report | ## See Also diff --git a/docs/PowerShell-integration.md b/docs/PowerShell-integration.md index 198b8294f..c0cebce57 100644 --- a/docs/PowerShell-integration.md +++ b/docs/PowerShell-integration.md @@ -1124,12 +1124,13 @@ Invoke-AltCover [-AssemblyExcludeFilter ] [-AssemblyFilter ] [-DropReturnCode ] [-FileFilter ] [-InPlace ] [-InputDirectory ] [-Key ] [-LineCover ] [-LocalSource ] [-MethodFilter ] [-MethodPoint ] [-MethodTopLevel -] [-OutputDirectory ] [-PathFilter ] [-Report ] [-ReportFormat -{NCover | OpenCover}] [-Save ] [-ShowGenerated ] [-ShowStatic -{KeepHidden | Mark | Reveal}] [-Single ] [-SourceLink ] -[-StrongNameKey ] [-SymbolDirectory ] [-Trivia ] [-TypeFilter -] [-TypeTopLevel ] [-Verbosity {Off | Error | Warning | Info | Verbose}] -[-VisibleBranches ] [-ZipFile ] [] +] [-OutputDirectory ] [-PathFilter ] [-Portable ] +[-Report ] [-ReportFormat {NCover | OpenCover | Json}] [-Save ] +[-ShowGenerated ] [-ShowStatic {KeepHidden | Mark | Reveal}] [-Single +] [-SourceLink ] [-StrongNameKey ] [-SymbolDirectory +] [-Trivia ] [-TypeFilter ] [-TypeTopLevel ] +[-Verbosity {Off | Error | Warning | Info | Verbose}] [-VisibleBranches ] [-ZipFile +] [] Invoke-AltCover [-Version] [] @@ -1472,9 +1473,9 @@ Accept wildcard characters? false ``` #### `-ReportFormat ` -Generate the report in the specified format (NCover or the default OpenCover) +Generate the report in the specified format (NCover, JSON or the default OpenCover) -Possible values: NCover, OpenCover +Possible values: NCover, OpenCover, Json ``` Required? false @@ -1542,8 +1543,8 @@ Accept wildcard characters? false ``` #### `-LineCover ` -Do not record branch coverage. Implies, and is compatible with, the -ReportFormat "opencover" -option. Incompatible with `-BranchCover`. +Do not record branch coverage. Is not compatible with the -ReportFormat "ncover" option. +Incompatible with `-BranchCover`. ``` Required? false @@ -1554,8 +1555,8 @@ Accept wildcard characters? false ``` #### `-BranchCover ` -Do not record line coverage. Implies, and is compatible with, the -ReportFormat "opencover" -option. Incompatible with `-LineCover`. +Do not record line coverage. Is not compatible with the -ReportFormat "ncover" option. +Incompatible with `-LineCover`. ``` Required? false @@ -1654,6 +1655,18 @@ Accept pipeline input? false Accept wildcard characters? false ``` +#### `-Portable ` +Portable operation - coverage report, control file and recorded data co-located with the +recorder assembly + +``` +Required? false +Position? named +Default value False +Accept pipeline input? false +Accept wildcard characters? false +``` + #### `-ShowStatic ` Instrument and show code that is by default skipped as trivial. @@ -1716,9 +1729,9 @@ None ``` -Invoke-AltCover -Report $x -OutputDirectory $o -InputDirectory $i -AssemblyFilter "Adapter" -ReportFormat NCover +Invoke-AltCover -Report $x -OutputDirectory $o -InputDirectory $i -AssemblyFilter "Adapter" -ReportFormat NCover -InformationAction Continue ``` --InformationAction Continue + ### Merge-OpenCover diff --git a/docs/Usage.md b/docs/Usage.md index cc8330e29..a8f182b7d 100644 --- a/docs/Usage.md +++ b/docs/Usage.md @@ -8,7 +8,7 @@ The full command line is ``` -AltCover [/i[nputDirectory]=VALUE] [/o[utputDirectory]=VALUE] [/y|symbolDirectory=VALUE] [/d[ependency]=VALUE] [/k[ey]=VALUE] [/sn|strongNameKey=VALUE] [/r[eport]=VALUE] [/f[ileFilter]=VALUE] [/p[athFilter]=VALUE] [/s|assemblyFilter=VALUE] [/e|assemblyExcludeFilter=VALUE] [/t[ypeFilter]=VALUE] [/m[ethodFilter]=VALUE] [/a[ttributeFilter]=VALUE] [/attributetoplevel=VALUE] [/typetoplevel=VALUE] [/methodtoplevel=VALUE] [--l[ocalSource]] [/c[allContext]=VALUE] [/reportFormat=VALUE] [--inplace] [--save] [--zipfile] [--methodpoint] [--single] [--linecover] [--branchcover] [--dropReturnCode] [--sourcelink] [--defer] [--v[isibleBranches]] [/showstatic[=VALUE]] [--showGenerated] [--trivia] [-q] [--verbose] [--?|help|h] [-- ] [...] +AltCover [/i[nputDirectory]=VALUE] [/o[utputDirectory]=VALUE] [/y|symbolDirectory=VALUE] [/d[ependency]=VALUE] [/k[ey]=VALUE] [/sn|strongNameKey=VALUE] [/r[eport]=VALUE] [/f[ileFilter]=VALUE] [/p[athFilter]=VALUE] [/s|assemblyFilter=VALUE] [/e|assemblyExcludeFilter=VALUE] [/t[ypeFilter]=VALUE] [/m[ethodFilter]=VALUE] [/a[ttributeFilter]=VALUE] [/attributetoplevel=VALUE] [/typetoplevel=VALUE] [/methodtoplevel=VALUE] [--l[ocalSource]] [/c[allContext]=VALUE] [/reportFormat=VALUE] [--inplace] [--save] [--zipfile] [--methodpoint] [--single] [--linecover] [--branchcover] [--dropReturnCode] [--sourcelink] [--defer] [--v[isibleBranches]] [/showstatic[=VALUE]] [--showGenerated] [--trivia] [--portable] [-q] [--verbose] [--?|help|h] [-- ] [...] or AltCover Runner [/r[ecorderDirectory]=VALUE] [/w[orkingDirectory]=VALUE] [/x|executable=VALUE] [--collect] [/l[covReport]=VALUE] [/t[hreshold]=VALUE] [/c[obertura]=VALUE] [/o[utputFile]=VALUE] [--dropReturnCode] [/summary|teamcity[=VALUE]] [-q] [--verbose] [--?|help|h] [-- ] [...] or @@ -134,6 +134,9 @@ In detail --showGenerated Optional: Mark generated code with a visit count of -2 (Automatic) for the Visualizer if unvisited --trivia Optional: Omit trivial sequence points + --portable Optional: portable operations - coverage report, + control file and recorded data co-located with + the recorder assembly -q Optional, multiple: Quiet mode -- once to switch off informational messages, twice to switch off warnings as well, three (or more) times to @@ -231,7 +234,7 @@ or, for the global tool only * The `--dependency` argument will expand environment variables in the paths from release 4.0.653; %USERPROFILE%, %ProgramFiles% and %NUGET_PACKAGES% are likely to be the most useful here, e.g. `%ProgramFiles%/dotnet/shared/Microsoft.AspNetCore.App/2.1.5/Microsoft.AspNetCore.Cryptography.KeyDerivation.dll` or similar to pick up ASP.Net Core assemblies needed for type references -* The `--callContext` argument is only used with `--opencover`, otherwise it has no effect. Tracked methods are recorded at instrumentation time, but call context information is only recorded in runner mode, including `runner --collect`, which allows for heavier processing after the process terminates than the `ProcessExit` handler. +* The `--callContext` argument has no effect with `NCover` report format. Tracked methods are recorded at instrumentation time, but call context information is only recorded in runner mode, including `runner --collect`, which allows for heavier processing after the process terminates than the `ProcessExit` handler. * In runner mode, exactly one of a command to be executed (`-x`) or the `--collect` option is required. If `--collect` is supplied then anything after a free-standing `--` is ignored. diff --git a/global.json b/global.json index 82dd9d3bd..c87dd8a25 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.202", + "version": "8.0.204", "rollForward": "latestMinor" } } \ No newline at end of file diff --git a/nupkg/build/AltCover.proj b/nupkg/build/AltCover.proj new file mode 100644 index 000000000..591fd61b9 --- /dev/null +++ b/nupkg/build/AltCover.proj @@ -0,0 +1,220 @@ + + + + false + Info + Fail + OK + + + + + + + + + + + + + + + + + + + + + + + $ + $(AltCoverDollarChar)(ProjectName) + $(AltCoverDollarChar)(SolutionDir) + $(AltCoverDollarChar)([System.Guid]::NewGuid()) + %(AltCoverXmlOutput.RootDir)/%(AltCoverXmlOutput.Directory)/%(AltCoverXmlOutput.Filename).$(TargetFramework)%(AltCoverXmlOutput.Extension) + $(ProjectDir)coverage$(AltCoverFileExtension) + $(ProjectDir)coverage.$(TargetFramework)$(AltCoverFileExtension) + - + OpenCover + + + + $(AltCoverReport.Replace($(AltCoverProjectName),$(ProjectName)).Replace($(AltCoverNewGuid),$([System.Guid]::NewGuid().ToString()))) + $(AltCoverReport1.Replace($(AltCoverSolutionDir),'') + $(AltCoverReport1.Replace($(AltCoverSolutionDir),$(SolutionDir))) + + + + + + + + + + + + + + + + + + + + + + + + + $(TargetPath) + $([System.IO.Path]::Combine($(AltCoverInstrumentedDirectory)_$(ProjectName), $(TargetFileName))) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(AltCoverShowSummary) + Foreground + $(TargetDir) + $(AltCoverInstrumentedDirectory)_$(ProjectName) + + + + + + + + + \ No newline at end of file diff --git a/nupkg/build/AltCover.targets b/nupkg/build/AltCover.targets index 11e37e0af..3ad15aa5a 100644 --- a/nupkg/build/AltCover.targets +++ b/nupkg/build/AltCover.targets @@ -29,211 +29,5 @@ - - false - Info - Fail - OK - - - - - - - - - - - - - - - - - - - - - - - $ - $(AltCoverDollarChar)(ProjectName) - $(AltCoverDollarChar)(SolutionDir) - $(AltCoverDollarChar)([System.Guid]::NewGuid()) - %(AltCoverXmlOutput.RootDir)/%(AltCoverXmlOutput.Directory)/%(AltCoverXmlOutput.Filename).$(TargetFramework)%(AltCoverXmlOutput.Extension) - $(ProjectDir)coverage$(AltCoverFileExtension) - $(ProjectDir)coverage.$(TargetFramework)$(AltCoverFileExtension) - - - OpenCover - - - - $(AltCoverReport.Replace($(AltCoverProjectName),$(ProjectName)).Replace($(AltCoverNewGuid),$([System.Guid]::NewGuid().ToString()))) - $(AltCoverReport1.Replace($(AltCoverSolutionDir),'') - $(AltCoverReport1.Replace($(AltCoverSolutionDir),$(SolutionDir))) - - - - - - - - - - - - - - - - - - - - - - - - $(TargetPath) - $([System.IO.Path]::Combine($(AltCoverInstrumentedDirectory)_$(ProjectName), $(TargetFileName))) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(AltCoverShowSummary) - Foreground - $(TargetDir) - $(AltCoverInstrumentedDirectory)_$(ProjectName) - - - - - - - - + \ No newline at end of file