C#: Improve alert message for RedundantToStringCall.ql

This commit is contained in:
Tom Hvitved
2026-04-17 13:15:10 +02:00
parent 426962e348
commit 0235df8758
2 changed files with 6 additions and 6 deletions

View File

@@ -20,4 +20,4 @@ where
mc instanceof ImplicitToStringExpr and
mc.getTarget() instanceof ToStringMethod and
not mc.getQualifier() instanceof BaseAccess
select mc, "Redundant call to 'ToString' on a String object."
select mc, "Redundant call to 'ToString'."

View File

@@ -1,5 +1,5 @@
| RedundantToStringCall.cs:8:27:8:38 | call to method ToString | Redundant call to 'ToString' on a String object. |
| RedundantToStringCall.cs:11:37:11:48 | call to method ToString | Redundant call to 'ToString' on a String object. |
| RedundantToStringCall.cs:14:39:14:50 | call to method ToString | Redundant call to 'ToString' on a String object. |
| RedundantToStringCall.cs:18:19:18:30 | call to method ToString | Redundant call to 'ToString' on a String object. |
| RedundantToStringCallBad.cs:7:45:7:56 | call to method ToString | Redundant call to 'ToString' on a String object. |
| RedundantToStringCall.cs:8:27:8:38 | call to method ToString | Redundant call to 'ToString'. |
| RedundantToStringCall.cs:11:37:11:48 | call to method ToString | Redundant call to 'ToString'. |
| RedundantToStringCall.cs:14:39:14:50 | call to method ToString | Redundant call to 'ToString'. |
| RedundantToStringCall.cs:18:19:18:30 | call to method ToString | Redundant call to 'ToString'. |
| RedundantToStringCallBad.cs:7:45:7:56 | call to method ToString | Redundant call to 'ToString'. |