Microsoft.Unity.Analyzers/doc/index.md

5.2 KiB

Diagnostic Analyzers

ID Title Category
UNT0001 Empty Unity message Performance
UNT0002 Inefficient tag comparison Performance
UNT0003 Usage of non generic GetComponent Type Safety
UNT0004 Time.fixedDeltaTime used with Update Correctness
UNT0005 Time.deltaTime used with FixedUpdate [retired] Correctness
UNT0006 Incorrect message signature Type Safety
UNT0007 Null coalescing on Unity objects Correctness
UNT0008 Null propagation on Unity objects Correctness
UNT0009 Missing static constructor with InitializeOnLoad Correctness
UNT0010 Component instance creation Type Safety
UNT0011 ScriptableObject instance creation Type Safety
UNT0012 Unused coroutine return value Correctness
UNT0013 Invalid or redundant SerializeField attribute Correctness
UNT0014 GetComponent called with non-Component or non-Interface type Type Safety
UNT0015 Incorrect method signature with InitializeOnLoadMethod, RuntimeInitializeOnLoadMethod or DidReloadScripts attribute Type Safety
UNT0016 Unsafe way to get the method name Type Safety
UNT0017 SetPixels invocation is slow Performance
UNT0018 System.Reflection features in performance critical messages Performance
UNT0019 Unnecessary indirection call for GameObject.gameObject Performance
UNT0020 MenuItem attribute used on non-static method Correctness
UNT0021 Unity message should be protected [opt-in] Correctness
UNT0022 Inefficient method to set position and rotation Performance
UNT0023 Coalescing assignment on Unity objects Correctness
UNT0024 Give priority to scalar calculations over vector calculations Performance
UNT0025 Input.GetKey overloads with KeyCode argument Correctness
UNT0026 GetComponent always allocates Performance
UNT0027 Do not call PropertyDrawer.OnGUI() Correctness
UNT0028 Use non-allocating physics APIs Performance
UNT0029 Pattern matching with null on Unity objects Correctness
UNT0030 Calling Destroy or DestroyImmediate on a Transform Correctness
UNT0031 Asset operations in LoadAttribute method Correctness
UNT0032 Inefficient method to set localPosition and localRotation Performance
UNT0033 Incorrect message case Correctness
UNT0034 A Vector3 can be converted into a Vector2 Performance
UNT0035 A Vector2 can be converted into a Vector3 Performance
UNT0036 Inefficient method to get position and rotation Performance
UNT0037 Inefficient method to get localPosition and localRotation Performance

Diagnostic Suppressors

ID Suppressed ID Justification
USP0001 IDE0029 Unity objects should not use null coalescing
USP0002 IDE0031 Unity objects should not use null propagation
USP0003 IDE0051 The Unity runtime invokes Unity messages
USP0004 IDE0044 Don't set fields with SerializeField or SerializeReference attributes to read-only
USP0005 IDE0060 The Unity runtime invokes Unity messages
USP0006 IDE0051 Don't flag private fields with SerializeField or SerializeReference attributes as unused
USP0007 CS0649 Don't flag fields with SerializeField or SerializeReference attributes as never assigned
USP0008 IDE0051 Don't flag private methods used with Invoke/InvokeRepeating or StartCoroutine/StopCoroutine as unused
USP0009 IDE0051 Don't flag methods with MenuItem/ContextMenu attribute or referenced by a field with the ContextMenuItem attribute as unused
USP0010 IDE0051 Don't flag fields with the ContextMenuItem attribute as unused
USP0011 IDE0044 Don't make fields with the ContextMenuItem attribute read-only
USP0012 IDE0051 Don't flag private methods with InitializeOnLoadMethod, RuntimeInitializeOnLoadMethod or DidReloadScripts attribute as unused
USP0013 CA1823 Don't flag private fields with SerializeField or SerializeReference attributes as unused
USP0014 CA1822 The Unity runtime invokes Unity messages
USP0015 CA1801 The Unity runtime invokes Unity messages
USP0016 CS8618 Initialization detection with nullable reference types
USP0017 IDE0074 Unity objects should not use coalescing assignment
USP0018 IDE0016 Unity objects should not be used with throw expressions
USP0019 IDE0051 Don't flag private methods with PreserveAttribute or UsedImplicitlyAttribute as unused
USP0020 IDE0052 The Unity runtime invokes Unity messages
USP0021 IDE0041 Prefer reference equality
USP0022 IDE0270 Unity objects should not use if null coalescing