From dc6d984fa865c2a82fa40fa41c2da7509c88adcc Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Fri, 7 Apr 2023 01:34:08 +0100 Subject: [PATCH] test: suppress ReSharper.Unity.InefficientPropertyAccess This is false positive being thrown by the analyzer. The values are - in fact - changing before being read each time. --- X10D.Unity.Tests/Assets/Tests/GameObjectTests.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/X10D.Unity.Tests/Assets/Tests/GameObjectTests.cs b/X10D.Unity.Tests/Assets/Tests/GameObjectTests.cs index 10ab455..c6b352a 100644 --- a/X10D.Unity.Tests/Assets/Tests/GameObjectTests.cs +++ b/X10D.Unity.Tests/Assets/Tests/GameObjectTests.cs @@ -2,6 +2,7 @@ using System; using System.Collections; +using System.Diagnostics.CodeAnalysis; using NUnit.Framework; using UnityEngine; using UnityEngine.TestTools; @@ -122,6 +123,7 @@ namespace X10D.Unity.Tests } [UnityTest] + [SuppressMessage("ReSharper", "Unity.InefficientPropertyAccess", Justification = "False positive.")] public IEnumerator LookAt_ShouldRotateSameAsTransform() { var first = new GameObject {transform = {position = Vector3.zero, rotation = Quaternion.identity}}; @@ -281,6 +283,7 @@ namespace X10D.Unity.Tests } [UnityTest] + [SuppressMessage("ReSharper", "Unity.InefficientPropertyAccess", Justification = "False positive.")] public IEnumerator SetParent_ShouldSetParent() { var first = new GameObject {transform = {position = Vector3.zero, rotation = Quaternion.identity}};