Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 884 Bytes

DES0004.md

File metadata and controls

29 lines (20 loc) · 884 Bytes

DES0004 Signature is dictated by its usage as a ComponentPredicate

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.