DES0004 Signature is dictated by its usage as a ComponentPredicate
March 15, 2020 ยท View on GitHub
Signature is dictated by its usage as a ComponentPredicate.
Suppressed Diagnostic ID
RCS1242 - Do not pass non-read-only struct by read-only reference
Examples of code that produces a suppressed diagnostic
using DefaultEcs.System;
namespace DummyNamespace
{
class DummyClass
{
[WithPredicate]
bool DummyMethod(in object _) => true;
}
}
Why is the diagnostic reported?
The IDE does not detect that the method signature is dictated by its usage as a ComponentPredicate through the WithPredicateAttribute and under normal circumstances, it would be reasonable to change its signature.
Why do we suppress this diagnostic?
The IDE does not detect that the method signature is dictated by its usage as a ComponentPredicate through the WithPredicateAttribute.