Fix CA1018
This commit is contained in:
@@ -616,6 +616,9 @@ dotnet_code_quality.api_surface = all
|
||||
#dotnet_code_quality.CA1010.additional_required_generic_interfaces =
|
||||
dotnet_diagnostic.CA1010.severity = warning
|
||||
|
||||
# Mark attributes with 'AttributeUsageAttribute'.
|
||||
dotnet_diagnostic.CA1018.severity = warning
|
||||
|
||||
# Provide ObsoleteAttribute message.
|
||||
dotnet_diagnostic.CA1041.severity = warning
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ namespace OpenRA.Scripting
|
||||
}
|
||||
|
||||
// For traitinfos that provide actor / player commands
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public sealed class ScriptPropertyGroupAttribute : Attribute
|
||||
{
|
||||
public readonly string Category;
|
||||
@@ -40,8 +41,10 @@ namespace OpenRA.Scripting
|
||||
}
|
||||
|
||||
// For property groups that are safe to initialize invoke on destroyed actors
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public sealed class ExposedForDestroyedActors : Attribute { }
|
||||
|
||||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Method)]
|
||||
public sealed class ScriptActorPropertyActivityAttribute : Attribute { }
|
||||
|
||||
public abstract class ScriptActorProperties
|
||||
@@ -115,6 +118,7 @@ namespace OpenRA.Scripting
|
||||
}
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public sealed class ScriptGlobalAttribute : Attribute
|
||||
{
|
||||
public readonly string Name;
|
||||
|
||||
@@ -23,6 +23,7 @@ using OpenRA.Support;
|
||||
|
||||
namespace OpenRA.Traits
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Interface)]
|
||||
public sealed class RequireExplicitImplementationAttribute : Attribute { }
|
||||
|
||||
[Flags]
|
||||
|
||||
Reference in New Issue
Block a user