Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update RSPEC before 9.28 release #9457

Merged
merged 1 commit into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions analyzers/rspec/cs/S1694.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ <h3>Documentation</h3>
and Sealed Classes and Class Members (C# Programming Guide)</a> </li>
<li> Microsoft Learn - <a href="https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/interfaces/">Interfaces - define behavior for
multiple types</a> </li>
<li> Microsoft Learn - <a href="https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/interfaces/default-interface-methods">Default
Interface Methods</a> </li>
<li> Microsoft Learn - <a
href="https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-8.0/default-interface-methods">Default Interface
Methods</a> </li>
<li> Microsoft Learn - <a
href="https://learn.microsoft.com/en-us/dotnet/csharp/advanced-topics/interface-implementation/default-interface-methods-versions">Tutorial: Update
interfaces with default interface methods</a> </li>
Expand Down
15 changes: 7 additions & 8 deletions analyzers/rspec/cs/S1871.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ <h2>Why is this an issue?</h2>
}
</pre>
<h3>Exceptions</h3>
<p>Blocks in an <code>if</code> chain that contain a single line of code are ignored, as are blocks in a <code>switch</code> statement that contain a
single line of code with or without a following <code>break</code>.</p>
<p>The rule does not raise an issue for blocks in an <code>if</code> chain that contain a single line of code. The same applies to blocks in a
<code>switch</code> statement that contain a single line of code with or without a following <code>break</code>.</p>
<pre>
if (a &gt;= 0 &amp;&amp; a &lt; 10)
{
Expand All @@ -87,17 +87,16 @@ <h3>Exceptions</h3>
DoTheThing();
}
</pre>
<p>But this exception does not apply to <code>if</code> chains without <code>else</code>-s, or to <code>switch</code>-es without default clauses when
all branches have the same single line of code. In the case of <code>if</code> chains with <code>else</code>-s, or of <code>switch</code>-es with
default clauses, rule {rule:csharpsquid:S3923} raises a bug.</p>
<p>However, this exception does not apply to <code>if</code> chains without an <code>else</code> statement or to a <code>switch</code> statement
without a <code>default</code> clause.</p>
<pre>
if(a == 1)
if (a == 1)
{
doSomething(); //Noncompliant, this might have been done on purpose but probably not
DoSomething(); // Noncompliant, this might have been done on purpose but probably not
}
else if (a == 2)
{
doSomething();
DoSomething();
}
</pre>
<h2>Resources</h2>
Expand Down
2 changes: 1 addition & 1 deletion analyzers/rspec/cs/S4201.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"title": "Null checks should not be used with \"is\"",
"title": "Null checks should not be combined with \"is\" operator checks",
"type": "CODE_SMELL",
"code": {
"impacts": {
Expand Down
6 changes: 3 additions & 3 deletions analyzers/rspec/vbnet/S1871.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ <h3>Exceptions</h3>
clauses when all branches have the same single line of code. In the case of <code>If</code> chains with <code>Else</code>-s, or of
<code>Select</code>-es with <code>Case Else</code> clauses, rule {rule:vbnet:S3923} raises a bug.</p>
<pre>
If a &gt;= 0 AndAlso a &lt; 10 Then
If a == 1 Then
DoTheThing() ' Noncompliant, this might have been done on purpose but probably not
ElseIf a == 2 Then
DoTheThing()
ElseIf a &gt;= 10 AndAlso a &lt; 20 Then
DoTheOtherThing() ' Noncompliant, this might have been done on purpose but probably not
End If
</pre>
<h2>Resources</h2>
Expand Down
2 changes: 1 addition & 1 deletion analyzers/rspec/vbnet/S4201.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"title": "Null checks should not be used with \"TypeOf Is\"",
"title": "Null checks should not be combined with \"TypeOf Is\" operator checks",
"type": "CODE_SMELL",
"code": {
"impacts": {
Expand Down
2 changes: 1 addition & 1 deletion analyzers/src/SonarAnalyzer.CSharp/sonarpedia.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"languages": [
"CSH"
],
"latest-update": "2024-06-10T14:50:07.301026900Z",
"latest-update": "2024-06-24T12:09:48.416439100Z",
"options": {
"no-language-in-filenames": true
}
Expand Down
2 changes: 1 addition & 1 deletion analyzers/src/SonarAnalyzer.VisualBasic/sonarpedia.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"languages": [
"VBNET"
],
"latest-update": "2024-06-10T14:50:28.179058600Z",
"latest-update": "2024-06-24T12:10:12.271374400Z",
"options": {
"no-language-in-filenames": true
}
Expand Down
Loading