Why this matters
Inconsistent placement of attributes can cause confusion and make code harder to read and modify.
Check if attributes are consistently placed in the code, maintaining uniform formatting across the project.
Inconsistent placement of attributes can cause confusion and make code harder to read and modify.
Side-by-side examples engineers can pattern-match during review.
[Obsolete]
public class OldClass {}
[Obsolete("Use NewMethod instead")] public void OldMethod() {}[Obsolete]
public class OldClass {}
[Obsolete("Use NewMethod instead")]
public void OldMethod() {}
[Obsolete]
public class OldClass {}
[Obsolete("Use NewMethod instead")] public void OldMethod() {}[Obsolete]
public class OldClass {}
[Obsolete("Use NewMethod instead")]
public void OldMethod() {}
From the same buckets as this rule.