mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
* Enable roslyn extension tests in CI * I'll be real I kinda just hoped that last one would work. dotnet test's --help documentation is useless garbage so I couldn't tell if that was supported or not. Guess not. * Actually fix the Roslyn tests. As far as I can tell, Roslyn tests haven't worked since #2976. The tests used a pretty awful technique of linking the test code against the analyzer, so that the analyzer's copy of the relevant attributes got included into the test. This then broke when the namespace got changed by the linked PR. Now the tests get an EmbeddedResource for the necessary test files compiled instead. Also applied this to DependencyAssignAnalyzerTest because why not.
19 lines
453 B
C#
19 lines
453 B
C#
using System;
|
|
|
|
#if ROBUST_ANALYZERS_IMPL
|
|
namespace Robust.Shared.Analyzers.Implementation;
|
|
#else
|
|
namespace Robust.Shared.Analyzers;
|
|
#endif
|
|
|
|
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.GenericParameter)]
|
|
public sealed class NotNullableFlagAttribute : Attribute
|
|
{
|
|
public readonly string TypeParameterName;
|
|
|
|
public NotNullableFlagAttribute(string typeParameterName)
|
|
{
|
|
TypeParameterName = typeParameterName;
|
|
}
|
|
}
|