Skip to content

Commit 7b703c1

Browse files
authored
SONARKT-413 Update rules metadata
1 parent d51f069 commit 7b703c1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+423
-337
lines changed

sonar-kotlin-plugin/sonarpedia.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"languages": [
44
"KOTLIN"
55
],
6-
"latest-update": "2023-12-14T11:00:42.692746Z",
6+
"latest-update": "2024-11-25T09:36:33.523743Z",
77
"options": {
88
"no-language-in-filenames": true,
99
"preserve-filenames": true

sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/ParsingError.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
"ruleSpecification": "RSPEC-2260",
1414
"sqKey": "S2260",
1515
"scope": "All",
16-
"quickfix": "unknown"
16+
"quickfix": "infeasible"
1717
}

sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S107.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<h2>Why is this an issue?</h2>
2-
<p>Functions with a long parameter list are difficult to use, as maintainers must figure out the role of each parameter and keep track of their
2+
<p>Functions with a long parameter list are difficult to use because maintainers must figure out the role of each parameter and keep track of their
33
position.</p>
44
<pre>
55
fun setCoordinates(x1: Int, y1: Int, z1: Int, x2: Int, y2: Int, z2: Int) { // Noncompliant

sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1125.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ <h2>Why is this an issue?</h2>
44
variable or expression that evaluates to a boolean value is unnecessary and can make the code harder to read and understand. The more complex a
55
boolean expression is, the harder it will be for developers to understand its meaning and expected behavior, and it will favour the introduction of
66
new bugs.</p>
7-
<h2>How to tix it</h2>
7+
<h2>How to fix it</h2>
88
<p>Remove redundant boolean literals from expressions to improve readability and make the code more maintainable.</p>
99
<h3>Code examples</h3>
1010
<h4>Noncompliant code example</h4>

sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1133.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@
1919
"ruleSpecification": "RSPEC-1133",
2020
"sqKey": "S1133",
2121
"scope": "All",
22-
"quickfix": "unknown"
22+
"quickfix": "infeasible"
2323
}

sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1134.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ <h2>Why is this an issue?</h2>
99
<h2>Resources</h2>
1010
<h3>Documentation</h3>
1111
<ul>
12-
<li> <a href="https://cwe.mitre.org/data/definitions/546">MITRE, CWE-546 - Suspicious Comment</a> </li>
12+
<li> CWE - <a href="https://cwe.mitre.org/data/definitions/546">CWE-546 - Suspicious Comment</a> </li>
1313
</ul>
1414

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<h2>Why is this an issue?</h2>
22
<p>Developers often use <code>TODO</code> tags to mark areas in the code where additional work or improvements are needed but are not implemented
3-
immediately. However, these <code>TODO</code> tags sometimes get overlooked or forgotten, leading to incomplete or unfinished code. This code smell
4-
class aims to identify and address such unattended <code>TODO</code> tags to ensure a clean and maintainable codebase. This description will explore
5-
why this is a problem and how it can be fixed to improve the overall code quality.</p>
3+
immediately. However, these <code>TODO</code> tags sometimes get overlooked or forgotten, leading to incomplete or unfinished code. This rule aims to
4+
identify and address unattended <code>TODO</code> tags to ensure a clean and maintainable codebase. This description explores why this is a problem
5+
and how it can be fixed to improve the overall code quality.</p>
66
<h3>What is the potential impact?</h3>
77
<p>Unattended <code>TODO</code> tags in code can have significant implications for the development process and the overall codebase.</p>
88
<p>Incomplete Functionality: When developers leave <code>TODO</code> tags without implementing the corresponding code, it results in incomplete
@@ -11,8 +11,8 @@ <h3>What is the potential impact?</h3>
1111
Delayed bug fixes can result in more severe issues and increase the effort required to resolve them later.</p>
1212
<p>Impact on Collaboration: In team-based development environments, unattended <code>TODO</code> tags can hinder collaboration. Other team members
1313
might not be aware of the intended changes, leading to conflicts or redundant efforts in the codebase.</p>
14-
<p>Codebase Bloat: Accumulation of unattended <code>TODO</code> tags over time can clutter the codebase and make it difficult to distinguish between
15-
work in progress and completed code. This bloat can make it challenging to maintain an organized and efficient codebase.</p>
14+
<p>Codebase Bloat: The accumulation of unattended <code>TODO</code> tags over time can clutter the codebase and make it difficult to distinguish
15+
between work in progress and completed code. This bloat can make it challenging to maintain an organized and efficient codebase.</p>
1616
<p>Addressing this code smell is essential to ensure a maintainable, readable, reliable codebase and promote effective collaboration among
1717
developers.</p>
1818
<h3>Noncompliant code example</h3>
@@ -23,6 +23,6 @@ <h3>Noncompliant code example</h3>
2323
</pre>
2424
<h2>Resources</h2>
2525
<ul>
26-
<li> <a href="https://cwe.mitre.org/data/definitions/546">MITRE, CWE-546</a> - Suspicious Comment </li>
26+
<li> CWE - <a href="https://cwe.mitre.org/data/definitions/546">CWE-546 - Suspicious Comment</a> </li>
2727
</ul>
2828

sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1135.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@
2424
546
2525
]
2626
},
27-
"quickfix": "unknown"
27+
"quickfix": "infeasible"
2828
}

sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S1145.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ <h3>Compliant solution</h3>
2525
</pre>
2626
<h2>Resources</h2>
2727
<ul>
28-
<li> <a href="https://cwe.mitre.org/data/definitions/489">MITRE, CWE-489</a> - Active Debug Code </li>
29-
<li> <a href="https://cwe.mitre.org/data/definitions/570">MITRE, CWE-570</a> - Expression is Always False </li>
30-
<li> <a href="https://cwe.mitre.org/data/definitions/571">MITRE, CWE-571</a> - Expression is Always True </li>
28+
<li> CWE - <a href="https://cwe.mitre.org/data/definitions/489">CWE-489 - Active Debug Code</a> </li>
29+
<li> CWE - <a href="https://cwe.mitre.org/data/definitions/570">CWE-570 - Expression is Always False</a> </li>
30+
<li> CWE - <a href="https://cwe.mitre.org/data/definitions/571">CWE-571 - Expression is Always True</a> </li>
3131
</ul>
3232

sonar-kotlin-plugin/src/main/resources/org/sonar/l10n/kotlin/rules/kotlin/S117.html

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@ <h2>Why is this an issue?</h2>
99
<h3>What is the potential impact?</h3>
1010
<p>Inconsistent naming of local variables and function parameters can lead to several issues in your code:</p>
1111
<ul>
12-
<li> Reduced Readability: inconsistent local variable and function parameter names make the code harder to read and understand; consequently, it is
13-
more difficult to identify the purpose of each variable, spot errors, or comprehend the logic. </li>
14-
<li> Difficulty in Identifying Variables: local variables and function parameters that don’t adhere to a standard naming convention are challenging
15-
to identify; thus, the coding process slows down, especially when dealing with a large codebase. </li>
16-
<li> Increased Risk of Errors: inconsistent or unclear local variable and function parameter names lead to misunderstandings about what the variable
17-
represents. This ambiguity leads to incorrect assumptions and, consequently, bugs in the code. </li>
18-
<li> Collaboration Difficulties: in a team setting, inconsistent naming conventions lead to confusion and miscommunication among team members. </li>
19-
<li> Difficulty in Code Maintenance: inconsistent naming leads to an inconsistent codebase. The code is difficult to understand, and making changes
20-
feels like refactoring constantly, as you face different naming methods. Ultimately, it makes the codebase harder to maintain. </li>
12+
<li> <strong>Reduced Readability</strong>: Inconsistent local variable and function parameter names make the code harder to read and understand;
13+
consequently, it is more difficult to identify the purpose of each variable, spot errors, or comprehend the logic. </li>
14+
<li> <strong>Difficulty in Identifying Variables</strong>: The local variables and function parameters that don’t adhere to a standard naming
15+
convention are challenging to identify; thus, the coding process slows down, especially when dealing with a large codebase. </li>
16+
<li> <strong>Increased Risk of Errors</strong>: Inconsistent or unclear local variable and function parameter names lead to misunderstandings about
17+
what the variable represents. This ambiguity leads to incorrect assumptions and, consequently, bugs in the code. </li>
18+
<li> <strong>Collaboration Difficulties</strong>: In a team setting, inconsistent naming conventions lead to confusion and miscommunication among
19+
team members. </li>
20+
<li> <strong>Difficulty in Code Maintenance</strong>: Inconsistent naming leads to an inconsistent codebase. The code is difficult to understand,
21+
and making changes feels like refactoring constantly, as you face different naming methods. Ultimately, it makes the codebase harder to maintain.
22+
</li>
2123
</ul>
2224
<p>In summary, not adhering to a naming convention for local variables and function parameters can lead to confusion, errors, and inefficiencies,
2325
making the code harder to read, understand, and maintain.</p>

0 commit comments

Comments
 (0)