Skip to content

Commit 625b2cc

Browse files
authored
Fix warnings (#1896)
* fix code warnings * fix XML comments warnings
1 parent 26ed31e commit 625b2cc

File tree

9 files changed

+14
-12
lines changed

9 files changed

+14
-12
lines changed

src/BenchmarkDotNet/Attributes/Filters/OperatingSystemsArchitectureFilterAttribute.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public class OperatingSystemsArchitectureFilterAttribute : FilterConfigBaseAttri
1212
public OperatingSystemsArchitectureFilterAttribute() { }
1313

1414
/// <param name="allowed">if set to true, the architectures are enabled, if set to false, disabled</param>
15+
/// <param name="architectures">the architecture(s) for which the filter should be applied</param>
1516
public OperatingSystemsArchitectureFilterAttribute(bool allowed, params Architecture[] architectures)
1617
: base(new SimpleFilter(_ =>
1718
{

src/BenchmarkDotNet/Attributes/Filters/OperatingSystemsFilterAttribute.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public class OperatingSystemsFilterAttribute : FilterConfigBaseAttribute
2626
public OperatingSystemsFilterAttribute() { }
2727

2828
/// <param name="allowed">if set to true, the OSes beloning to platforms are enabled, if set to false, disabled</param>
29+
/// <param name="platforms">the platform(s) for which the filter should be applied</param>
2930
public OperatingSystemsFilterAttribute(bool allowed, params OS[] platforms)
3031
: base(new SimpleFilter(_ =>
3132
{

src/BenchmarkDotNet/Environments/OsBrandStringHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public string ToPrettifiedString([CanBeNull] int? ubr)
139139

140140
// See https://en.wikipedia.org/wiki/Windows_10_version_history
141141
// See https://en.wikipedia.org/wiki/Windows_11_version_history
142-
private static readonly List<Windows1XVersion> WellKnownVersions = new()
142+
private static readonly List<Windows1XVersion> WellKnownVersions = new ()
143143
{
144144
// Windows 10
145145
new Windows1XVersion("1507", "Threshold 1", "RTM", 10240),

src/BenchmarkDotNet/Environments/Runtimes/WasmRuntime.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
using System;
22
using System.ComponentModel;
33
using System.IO;
4-
using BenchmarkDotNet.Extensions;
54
using BenchmarkDotNet.Jobs;
6-
using BenchmarkDotNet.Toolchains.MonoWasm;
75

86
namespace BenchmarkDotNet.Environments
97
{
@@ -23,12 +21,12 @@ public class WasmRuntime : Runtime, IEquatable<WasmRuntime>
2321
/// <summary>
2422
/// creates new instance of WasmRuntime
2523
/// </summary>
26-
/// <param name="mainJs">MANDATORY path to the main.js file.</param>
2724
/// <param name="javaScriptEngine">Full path to a java script engine used to run the benchmarks. "v8" by default</param>
2825
/// <param name="javaScriptEngineArguments">Arguments for the javascript engine. "--expose_wasm" by default</param>
2926
/// <param name="msBuildMoniker">moniker, default: "net5.0"</param>
3027
/// <param name="displayName">default: "Wasm"</param>
31-
/// <remarks>path to mainJs MUST be provided</remarks>
28+
/// <param name="aot">Specifies whether AOT or Interpreter (default) project should be generated.</param>
29+
/// <param name="runtimeSrcDir">The path to runtime source directory.</param>
3230
public WasmRuntime(string msBuildMoniker = "net5.0", string displayName = "Wasm", string javaScriptEngine = "v8", string javaScriptEngineArguments = "--expose_wasm", bool aot = false, DirectoryInfo runtimeSrcDir = null) : base(RuntimeMoniker.Wasm, msBuildMoniker, displayName)
3331
{
3432
if (!string.IsNullOrEmpty(javaScriptEngine) && javaScriptEngine != "v8" && !File.Exists(javaScriptEngine))

src/BenchmarkDotNet/Order/CategoryComparer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace BenchmarkDotNet.Order
77
internal class CategoryComparer : IComparer<string[]>
88
{
99
private const string Separator = "§";
10-
public static readonly CategoryComparer Instance = new();
10+
public static readonly CategoryComparer Instance = new ();
1111

1212
public int Compare(string[] x, string[] y)
1313
{

src/BenchmarkDotNet/Running/BenchmarkRunnerDirty.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public static Summary Run(Type type, IConfig config = null, string[] args = null
2929
using (DirtyAssemblyResolveHelper.Create())
3030
return RunWithExceptionHandling(() => RunWithDirtyAssemblyResolveHelper(type, config, args));
3131
}
32-
32+
3333
[PublicAPI]
3434
public static Summary[] Run(Type[] types, IConfig config = null, string[] args = null)
3535
{
@@ -95,7 +95,7 @@ private static Summary[] RunWithDirtyAssemblyResolveHelper(Assembly assembly, IC
9595
=> args == null
9696
? BenchmarkRunnerClean.Run(assembly.GetRunnableBenchmarks().Select(type => BenchmarkConverter.TypeToBenchmarks(type, config)).ToArray())
9797
: new BenchmarkSwitcher(assembly).RunWithDirtyAssemblyResolveHelper(args, config, false).ToArray();
98-
98+
9999
[MethodImpl(MethodImplOptions.NoInlining)]
100100
private static Summary[] RunWithDirtyAssemblyResolveHelper(Type[] types, IConfig config, string[] args)
101101
=> args == null

src/BenchmarkDotNet/Toolchains/CoreRt/CoreRtToolchain.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ public class CoreRtToolchain : Toolchain
3535
/// compiled as net6.0, targets latest (6.0.0-*) CoreRT build from the new feed: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json
3636
/// </summary>
3737
public static readonly IToolchain Core60 = CreateBuilder().UseCoreRtNuGet().TargetFrameworkMoniker("net6.0").ToToolchain();
38+
/// <summary>
39+
/// compiled as net7.0, targets latest (6.0.0-*) CoreRT build from the new feed: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json
3840
/// </summary>
3941
public static readonly IToolchain Core70 = CreateBuilder().UseCoreRtNuGet().TargetFrameworkMoniker("net7.0").ToToolchain();
4042

tests/BenchmarkDotNet.Tests/Order/DefaultOrdererTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ namespace BenchmarkDotNet.Tests.Order
1717
{
1818
public class DefaultOrdererTests
1919
{
20-
private static Summary CreateMockSummary() => new("", ImmutableArray<BenchmarkReport>.Empty, HostEnvironmentInfo.GetCurrent(),
20+
private static Summary CreateMockSummary() => new ("", ImmutableArray<BenchmarkReport>.Empty, HostEnvironmentInfo.GetCurrent(),
2121
"", "", TimeSpan.Zero, CultureInfo.InvariantCulture, ImmutableArray<ValidationError>.Empty);
2222

23-
private static BenchmarkCase CreateBenchmarkCase(string category, int parameter, params BenchmarkLogicalGroupRule[] rules) => new(
23+
private static BenchmarkCase CreateBenchmarkCase(string category, int parameter, params BenchmarkLogicalGroupRule[] rules) => new (
2424
new Descriptor(null, null, categories: new[] { category }),
2525
new Job(),
2626
new ParameterInstances(new[]

tests/BenchmarkDotNet.Tests/ParamsSourceTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public void NullIsSupportedAsElementOfParamsSource()
1414
{
1515
BenchmarkConverter.TypeToBenchmarks(typeof(ParamsSourceWithNull));
1616
}
17-
17+
1818
public class ParamsSourceWithNull
1919
{
2020
public static IEnumerable<object> Values()
@@ -30,6 +30,6 @@ public static IEnumerable<object> Values()
3030

3131
[Benchmark]
3232
public object FooBar() => O;
33-
}
33+
}
3434
}
3535
}

0 commit comments

Comments
 (0)