Modify rule S1696: Fix link (#3736)

This commit is contained in:
Marco Borgeaud 2024-03-06 16:10:30 +01:00 committed by GitHub
parent 413b689086
commit e29edd12ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,7 +13,7 @@ Instead of catching NullReferenceException, it's better to prevent it from happe
[source,csharp,diff-id=1,diff-type=noncompliant]
----
public int GetLengthPlusTwo(string str)
public int GetLengthPlusTwo(string str)
{
try
{
@ -46,6 +46,6 @@ public int GetLengthPlusTwo(string str)
* CWE - https://cwe.mitre.org/data/definitions/395[CWE-395 - Use of NullPointerException Catch to Detect NULL Pointer Dereference]
* Microsoft Learn - https://learn.microsoft.com/en-us/dotnet/api/system.nullreferenceexception[NullReferenceException class]
* Microsoft Learn - https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/member-access-operators#null-conditional-operators--and-[Null-conditional operators ?. and ?[]]
* Microsoft Learn - https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/member-access-operators#null-conditional-operators\--and-[Null-conditional operators ?. and ?[\]]
include::../rspecator.adoc[]