Skip to content

Commit

Permalink
Restrict MemoryDiagnoserAttribute usage to class (#1122), fixes #1119
Browse files Browse the repository at this point in the history
* Restrict MemoryDiagnoserAttribute usage to class

* Restricted rest of unrestricted attributes
  • Loading branch information
Rizzen authored and adamsitnik committed Mar 31, 2019
1 parent 1c1913a commit e1d4d2f
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/BenchmarkDotNet/Attributes/ArtifactsPathAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace BenchmarkDotNet.Attributes
{
[PublicAPI]
[AttributeUsage(AttributeTargets.Class)]
public class ArtifactsPathAttribute : Attribute, IConfigSource
{
public string Value { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace BenchmarkDotNet.Attributes
{
[AttributeUsage(AttributeTargets.Class)]
public class DisassemblyDiagnoserAttribute : Attribute, IConfigSource
{
/// <param name="printIL">IL will be printed. False by default.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace BenchmarkDotNet.Attributes
{
[PublicAPI]
[AttributeUsage(AttributeTargets.Class)]
public class GroupBenchmarksByAttribute: Attribute, IConfigSource
{
public IConfig Config { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace BenchmarkDotNet.Attributes
/// determines if all auto-generated files should be kept or removed after running the benchmarks
/// </summary>
[PublicAPI]
[AttributeUsage(AttributeTargets.Class)]
public class KeepBenchmarkFilesAttribute : Attribute, IConfigSource
{
public IConfig Config { get; }
Expand Down
1 change: 1 addition & 0 deletions src/BenchmarkDotNet/Attributes/MemoryDiagnoserAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace BenchmarkDotNet.Attributes
{
[AttributeUsage(AttributeTargets.Class)]
public class MemoryDiagnoserAttribute : Attribute, IConfigSource
{
public IConfig Config { get; }
Expand Down
4 changes: 3 additions & 1 deletion src/BenchmarkDotNet/Attributes/StopOnFirstErrorAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
using BenchmarkDotNet.Configs;
using JetBrains.Annotations;

namespace BenchmarkDotNet.Attributes {
namespace BenchmarkDotNet.Attributes
{
/// <summary>
/// determines if running should be stop after first error
/// </summary>
[PublicAPI]
[AttributeUsage(AttributeTargets.Class)]
public class StopOnFirstErrorAttribute : Attribute, IConfigSource
{
public IConfig Config { get; }
Expand Down

0 comments on commit e1d4d2f

Please sign in to comment.