2871 Commits

Author SHA1 Message Date
Angelo Buono
e8cd1b485d
Modify rule S106: Migrate to LayC - Standard outputs should not be used directly to log anything (#3280)
Co-authored-by: Marco Borgeaud <89914223+marco-antognini-sonarsource@users.noreply.github.com>
Co-authored-by: Zsolt Kolbay <121798625+zsolt-kolbay-sonarsource@users.noreply.github.com>
2023-10-16 18:57:06 +00:00
Zsolt Kolbay
41ffd7e39b
Modify S2971: Migrate To LayC (#3282) 2023-10-16 17:04:12 +02:00
Fred Tingaud
6f24cc0632
Clean rule at root
In some cases, the `rule.adoc` at root of a rule is never included
anywhere and thus is dead code.
It's a maintenance cost by itself, but also it misses opportunities to
inline code that seems used by two documents when in fact only one
document is actually rendered. And this missed opportunity, in turn,
stops us from applying the correct language tag on the code samples.
2023-10-16 16:34:38 +02:00
Marco Borgeaud
ccf6472c46 Modify rule S1905: Remove link
The Geeksforgeeks article promotes the C-style casts without any note on
its dangerousness. The C++ alternative are presented as an adoc thing,
missing the point again.
2023-10-16 15:51:00 +02:00
Marco Borgeaud
5ee8ae68cf Modify rule S1481: Mention [[maybe_unused]] 2023-10-16 15:51:00 +02:00
Marco Borgeaud
8918478946 Modify rule S112: Improve grammar and asciidoc 2023-10-16 15:51:00 +02:00
Marco Borgeaud
92ba587f4f Modify rule S109: minor grammatical improvement
Avoid contractions, simplify sentence and fix typo.
2023-10-16 15:51:00 +02:00
Marco Borgeaud
1cc87de1dd Modify rule S1068: use consistent indentation 2023-10-16 15:51:00 +02:00
Marco Borgeaud
439408f60f Modify rule S1066: fix typo 2023-10-16 15:51:00 +02:00
Marco Borgeaud
d3eb6a2412
Modify rule S1110: Migrate To LayC - redundant parentheses (#3281)
Provide consistent examples for CFamily, CSharp, and Java.

Make JS, PHP, Apex, Go, Kotlin, and Scala consistent.

Python has its own syntax so inline relevant bits.

Other languages are not updated: their description is considered good
enough and it would require a significant investment to not mess up the
syntax in their examples.
2023-10-16 13:31:15 +02:00
Marco Borgeaud
98517de0ff
Modify rule S1117: Migrate To LayC - shadow variables (#3270)
The languages for this rule fall into two categories:

* CFamily, JS, and PLSQL: "Variables should not be shadowed" (general
case of shadowing)
* C#, Flex, Java, PHP, Swift: "Local variables should not shadow
field/property/enum case/..." (narrow case of shadowing)

For CFamily, these tickets are also handled: CPP-2785 CPP-3589
2023-10-16 12:04:08 +02:00
Fred Tingaud
62a4840a6a
Modify S1066: Migrate to LayC - merge if 2023-10-16 09:46:41 +00:00
github-actions[bot]
016434b60a
Create rule S6824: No ARIA role or property for unsupported DOM elements (#3283)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6824/javascript)
(updated a few minutes after each push).
2023-10-16 09:40:32 +00:00
Victor
95d63e2cec
Modify S3257: Migrate to LayC (#3267) 2023-10-16 09:06:00 +00:00
Guillaume Dequenne
e887caa47f
Modify S6660: Fix typo in code snippet (#3278) 2023-10-16 09:49:36 +02:00
Rudy Regazzoni
42bce2ac2d
Modify S125: Migrate to LayC - commented code (#3258) 2023-10-16 09:17:24 +02:00
Peter Trifanov
d953a8c265
Modify S1121: Migrate to LayC - Assignments should not be made from within sub-expressions
Co-authored-by: Fred Tingaud <frederic.tingaud@sonarsource.com>
2023-10-13 19:17:01 +02:00
Guillaume Dequenne
5f3c3c5da7
Modify S112: Migrate to LaYC - Generic exceptions should never be thrown (#3242) 2023-10-13 14:57:41 +02:00
github-actions[bot]
1f68ed2442
Create rule S6819: : Prefer tag over ARIA role (#3259)
https://github.com/SonarSource/SonarJS/issues/4242
2023-10-13 14:51:23 +02:00
github-actions[bot]
0f96a5b265
Create rule S6821: DOM elements with ARIA roles should have a valid non-abstract role (#3268)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6821/javascript)
(updated a few minutes after each push).
2023-10-13 11:50:54 +00:00
leonardo-pilastri-sonarsource
fd418f9f77
Modify S1125: migrate to LayC (#3265) 2023-10-13 13:50:06 +02:00
Zsolt Kolbay
37030a89dd
Modify S1854: Migrate to LayC (#3274) 2023-10-13 12:26:37 +02:00
nicolas-gauthier-sonarsource
828e2d54cc
Modify S1481: Migrate to LaYC (#3245)
## Review

A dedicated reviewer checked the rule description successfully for:

- [x] logical errors and incorrect information
- [x] information gaps and missing content
- [x] text style and tone
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-10-13 11:59:36 +02:00
Victor
49f3562d64
Modify S4649: Migrate to LayC (#3272) 2023-10-13 11:31:39 +02:00
Angelo Buono
febb2d2152
Modify rule S116: Migrate to LayC - Field names should comply with a naming convention (#3266)
Co-authored-by: Fred Tingaud <95592999+frederic-tingaud-sonarsource@users.noreply.github.com>
2023-10-13 10:06:09 +02:00
Yassin Kammoun
e8d14c4eb4
Modify S2933: Migrate to LayC (#3261)
## 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: Zsolt Kolbay <121798625+zsolt-kolbay-sonarsource@users.noreply.github.com>
2023-10-13 08:05:03 +02:00
Renaud T
873ad08b36
Modify S1104: Migrate To LayC - avoid public field (#3238) 2023-10-12 18:11:39 +02:00
Peter Trifanov
55e10f0d8d
Modify S1172: Migrate to LayC - unused function parameters should be removed (#3257) 2023-10-12 14:12:10 +00:00
github-actions[bot]
4733f37b19
Create rule S6791: Disallow usage of unsafe lifecycle methods (react/no-unsafe) (#3188) 2023-10-12 15:12:54 +02:00
github-actions[bot]
b7c2c63f95
Create rule S6811: DOM elements with ARIA role should only have supported properties (#3244)
https://github.com/SonarSource/SonarJS/issues/4244
2023-10-12 14:31:32 +02:00
github-actions[bot]
a422950ed5
Create rule S6793: ARIA properties in DOM elements should have valid values (#3200)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6793/javascript)
(updated a few minutes after each push).
2023-10-12 14:12:47 +02:00
Amelie Renard
04b1bdb263 Modify rule S5274: reword, add diff view and documentation links 2023-10-12 11:09:15 +02:00
Amelie Renard
0c4b5381de Modify rule S6180: add diff view and documentation link 2023-10-12 11:09:15 +02:00
Amelie Renard
b04a8579b6 Modify rule S6016: fix grammar 2023-10-12 11:09:15 +02:00
Amelie Renard
753b85db2e Modify rule S6187: reformat code examples 2023-10-12 11:09:15 +02:00
Amelie Renard
52030d1728 Modify rule S6190: add documentation link and reformat code examples 2023-10-12 11:09:15 +02:00
Amelie Renard
9e3420b525 Modify rule S6168: add documentation link and diff view 2023-10-12 11:09:15 +02:00
Amelie Renard
917b07db46 Modify rule S6195: explicit acronym and add documentation links 2023-10-12 11:09:15 +02:00
Amelie Renard
fe78934952 Modify rule S5018: add diff view 2023-10-12 11:09:15 +02:00
Amelie Renard
b351bef154 Modify rule S1836: reformat links 2023-10-12 11:09:15 +02:00
Amelie Renard
5108b75b75 Modify rule S3471: add diff view 2023-10-12 10:05:16 +02:00
Amelie Renard
9327e7c639 Modify rule S5414: move exception code example 2023-10-12 10:05:16 +02:00
Amelie Renard
db6fa43955 Modify rule S5421: add "noncompliant" comments 2023-10-12 10:05:16 +02:00
Amelie Renard
326641875c Modify rule S5409: add diff view 2023-10-12 10:05:16 +02:00
Amelie Renard
3f433464ed Modify rule S3642: add documentation link 2023-10-12 10:05:16 +02:00
Amelie Renard
9783f1834f Modify rule S5945: explicit acronym 2023-10-12 10:05:16 +02:00
Amelie Renard
32681b7498 Modify rule S6005: add diff view and documentation link 2023-10-12 10:05:16 +02:00
Victor
e65d456d23
Modify S1874: Migrate to LayC (#3241) 2023-10-11 19:48:17 +02:00
Peter Trifanov
923f9ff0f9
Modify S134: Migrate to LayC - nested control flow statements shouldn't be too deep (#3237) 2023-10-11 14:43:59 +00:00
Fred Tingaud
5879d3546c
Modify S878: Migrate to LayC - comma operator
Co-authored-by: Marco Borgeaud <89914223+marco-antognini-sonarsource@users.noreply.github.com>
Co-authored-by: Yassin Kammoun <52890329+yassin-kammoun-sonarsource@users.noreply.github.com>
2023-10-11 14:34:18 +00:00