Logo
Explore Help
Register Sign In
ishangsf/rspec
2
0
Fork 0
You've already forked rspec
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
rspec/rules/S2259/how-dotnet.adoc

17 lines
367 B
Plaintext
Raw Normal View History

Modify rule S2259: LaYC format (#2294)
2023-07-03 17:26:15 +02:00
== How to fix it
Modify S2259: Migrate to LaYC - null dereference (#3337) ## Review A dedicated reviewer checked the rule description successfully for: - [ ] logical errors and incorrect information - [ ] information gaps and missing content - [ ] text style and tone - [ ] PR summary and labels follow [the guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule) --------- Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com> Co-authored-by: leonardo-pilastri-sonarsource <115481625+leonardo-pilastri-sonarsource@users.noreply.github.com>
2023-10-23 14:29:59 +02:00
To fix the issue, the access of the `{null-keyword}` value needs to be prevented by either:
Modify rule S2259: LaYC format (#2294)
2023-07-03 17:26:15 +02:00
* ensuring the variable has a value, or
* by checking if the value is not `{null-keyword}`
=== Code examples
==== Noncompliant code example
include::{language}/noncompliant-code.adoc[]
==== Compliant solution
include::{language}/compliant-code.adoc[]
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.5 Page: 887ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API