Skip to content

Commit

Permalink
Update RSPEC before 9.6 release (#7654)
Browse files Browse the repository at this point in the history
  • Loading branch information
zsolt-kolbay-sonarsource authored Jul 24, 2023
1 parent 14115ea commit 1366be8
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 18 deletions.
5 changes: 2 additions & 3 deletions analyzers/rspec/cs/S104.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<h2>Why is this an issue?</h2>
<p>A source file that grows too much tends to aggregate too many responsibilities and inevitably becomes harder to understand and, therefore, to
maintain.</p>
<p>When a source file grows too much, it can accumulate numerous responsibilities and become challenging to understand and maintain.</p>
<p>Above a specific threshold, refactor the file into smaller files whose code focuses on well-defined tasks. Those smaller files will be easier to
understand and easier to test.</p>
understand and test.</p>

4 changes: 2 additions & 2 deletions analyzers/rspec/cs/S1751.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h2>Why is this an issue?</h2>
<h2>How to fix it</h2>
<h3>Code examples</h3>
<h4>Noncompliant code example</h4>
<pre>
<pre data-diff-id="1" data-diff-type="noncompliant">
public object Method(IEnumerable&lt;object&gt; items)
{
for (int i = 0; i &lt; 10; i++)
Expand All @@ -40,7 +40,7 @@ <h4>Noncompliant code example</h4>
}
</pre>
<h4>Compliant solution</h4>
<pre>
<pre data-diff-id="1" data-diff-type="compliant">
public object Method(IEnumerable&lt;object&gt; items)
{
for (int i = 0; i &lt; 10; i++)
Expand Down
2 changes: 1 addition & 1 deletion analyzers/rspec/cs/S3329.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
"2.9.2"
]
},
"quickfix": "unknown"
"quickfix": "targeted"
}
5 changes: 3 additions & 2 deletions analyzers/rspec/cs/S4143.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<h2>Why is this an issue?</h2>
<p>Storing a value inside a collection at a given key or index and then unconditionally overwriting it without reading the initial value is a case of
"dead store".</p>
a "dead store".</p>
<pre>
list[index] = "value 1";
list[index] = "value 2"; // Noncompliant

dictionary.Add(key, "value 1");
dictionary[key] = "value 2"; // Noncompliant
</pre>
<p>At best it is redundant and will confuse the reader, most often it is an error and not what the developer intended to do.</p>
<p>This practice is redundant and will cause confusion for the reader. More importantly, it is often an error and not what the developer intended to
do.</p>

2 changes: 1 addition & 1 deletion analyzers/rspec/cs/S6563.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"title": "Use UTC when recoding DateTime instants",
"title": "Use UTC when recording DateTime instants",
"type": "CODE_SMELL",
"status": "ready",
"remediation": {
Expand Down
5 changes: 2 additions & 3 deletions analyzers/rspec/vbnet/S104.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<h2>Why is this an issue?</h2>
<p>A source file that grows too much tends to aggregate too many responsibilities and inevitably becomes harder to understand and, therefore, to
maintain.</p>
<p>When a source file grows too much, it can accumulate numerous responsibilities and become challenging to understand and maintain.</p>
<p>Above a specific threshold, refactor the file into smaller files whose code focuses on well-defined tasks. Those smaller files will be easier to
understand and easier to test.</p>
understand and test.</p>

2 changes: 1 addition & 1 deletion analyzers/rspec/vbnet/S3329.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
"2.9.2"
]
},
"quickfix": "partial"
"quickfix": "targeted"
}
5 changes: 3 additions & 2 deletions analyzers/rspec/vbnet/S4143.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<h2>Why is this an issue?</h2>
<p>Storing a value inside a collection at a given key or index and then unconditionally overwriting it without reading the initial value is a case of
"dead store".</p>
a "dead store".</p>
<pre>
towns.Item(x) = "London"
towns.Item(x) = "Chicago"; // Noncompliant
</pre>
<p>At best it is redundant and will confuse the reader, most often it is an error and not what the developer intended to do.</p>
<p>This practice is redundant and will cause confusion for the reader. More importantly, it is often an error and not what the developer intended to
do.</p>

2 changes: 1 addition & 1 deletion analyzers/rspec/vbnet/S6563.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"title": "Use UTC when recoding DateTime instants",
"title": "Use UTC when recording DateTime instants",
"type": "CODE_SMELL",
"status": "ready",
"remediation": {
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": "2023-07-07T06:47:09.164253400Z",
"latest-update": "2023-07-24T14:55:21.573727300Z",
"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": "2023-07-07T06:48:21.170480400Z",
"latest-update": "2023-07-24T14:54:55.036971700Z",
"options": {
"no-language-in-filenames": true
}
Expand Down

0 comments on commit 1366be8

Please sign in to comment.