Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions coverlet.runsettings
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
<DataCollector friendlyName="XPlat Code Coverage">
<Configuration>
<Format>opencover</Format>
<Exclude>[*.Test*]*,[*]Microsoft.Diagnostics*</Exclude>
<Include>[Steeltoe.*]*</Include>
<ExcludeByAttribute>Obsolete,GeneratedCodeAttribute,CompilerGeneratedAttribute</ExcludeByAttribute>
<Exclude>[ConfigurationSchemaGenerator]*</Exclude>
<ExcludeByFile>**/test/**/*.*</ExcludeByFile>
<ExcludeByAttribute>ObsoleteAttribute,GeneratedCodeAttribute,CompilerGeneratedAttribute</ExcludeByAttribute>
<UseSourceLink>true</UseSourceLink>
<IncludeTestAssembly>false</IncludeTestAssembly>
<SkipAutoProps>false</SkipAutoProps>
</Configuration>
</DataCollector>
</DataCollectors>
Expand Down
3 changes: 3 additions & 0 deletions src/Common/src/Common/ConfigurationSchemaAttributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@
// Steeltoe: This file was copied from the .NET Aspire Configuration Schema generator
// at https://github.com/dotnet/aspire/tree/cb7cc4d78f8dd2b4df1053a229493cdbf88f50df/src/Tools/ConfigurationSchemaGenerator.

using System.Diagnostics.CodeAnalysis;

namespace Aspire;

/// <summary>
/// Attribute used to automatically generate a JSON schema for a component's configuration.
/// </summary>
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
[ExcludeFromCodeCoverage(Justification = "Used while compiling Steeltoe, does not ship with Steeltoe.")]
internal sealed class ConfigurationSchemaAttribute : Attribute
{
public ConfigurationSchemaAttribute(string path, Type type, string[]? exclusionPaths = null)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.

using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;

namespace Steeltoe.Management.Endpoint.Actuators.Health.Contributors.FileSystem;
Expand All @@ -26,6 +27,7 @@ private NetworkShareWrapper(ulong freeBytesAvailable, ulong totalNumberOfBytes)
: null;
}

[ExcludeFromCodeCoverage(Justification = "Workaround for https://github.com/coverlet-coverage/coverlet/issues/1762")]
private static partial class NativeMethods
{
[LibraryImport("kernel32.dll", EntryPoint = "GetDiskFreeSpaceExW", StringMarshalling = StringMarshalling.Utf16, SetLastError = true)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ public async Task<IList<ThreadInfo>> DumpThreadsAsync(CancellationToken cancella
}
finally
{
#pragma warning disable S1215 // "GC.Collect" should not be called
long totalMemory = GC.GetTotalMemory(true);
#pragma warning restore S1215 // "GC.Collect" should not be called
_logger.LogDebug("Total memory: {Memory}.", totalMemory);
}
}, cancellationToken);
Expand Down
Loading