Why this matters
Structs without IEquatable<T> use boxing and reflection for equality checks, reducing performance.
IEquatable<T>Ensure that value types (structs) implement IEquatable<T> for efficient equality comparisons, avoiding boxing and reflection.
Structs without IEquatable<T> use boxing and reflection for equality checks, reducing performance.
Side-by-side examples engineers can pattern-match during review.
struct MyStruct // Noncompliant
{
public int Value { get; set; }
}struct MyStruct : IEquatable<MyStruct>
{
public int Value { get; set; }
public bool Equals(MyStruct other)
{
// ...
}
}From the same buckets as this rule.
All static JS/CSS/font/image files MUST use content-hashed filenames (e.g., app.9c1a7b.js) and be served with "Cache-Control: public, max-age=31536000, immutable". HTML and other non-fingerprinted documents MUST be served with "Cache-Control: no-cache" (or equivalent) to enable conditional revalidation.