From 8b872cfe89d441454c6330676fa766b14867960e Mon Sep 17 00:00:00 2001 From: Antonio Aversa Date: Wed, 5 Apr 2023 16:21:04 +0200 Subject: [PATCH] S3655: Add ITs in intentional findings (#7030) --- .../IntentionalFindings/S3655.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 analyzers/its/sources/ManuallyAddedNoncompliantIssues.CS/IntentionalFindings/S3655.cs diff --git a/analyzers/its/sources/ManuallyAddedNoncompliantIssues.CS/IntentionalFindings/S3655.cs b/analyzers/its/sources/ManuallyAddedNoncompliantIssues.CS/IntentionalFindings/S3655.cs new file mode 100644 index 00000000000..dac524851e8 --- /dev/null +++ b/analyzers/its/sources/ManuallyAddedNoncompliantIssues.CS/IntentionalFindings/S3655.cs @@ -0,0 +1,19 @@ +/* + * + * Copyright (c) - + * + * Please configure this header in your SonarCloud/SonarQube quality profile. + * You can also set it in SonarLint.xml additional file for SonarLint or standalone NuGet analyzer. + */ + +namespace IntentionalFindings +{ + public class S3655 + { + public void ValueAccessOnEmptyNullable() + { + int? i = null; + _ = i.Value; // Noncompliant (S3655) {{'i' is null on at least one execution path.}} + } + } +}