2529 Commits

Author SHA1 Message Date
Martin Strecker
2ea2899a46
Modify S3346: LaYC format (#2295)
https://sonarsource.github.io/rspec/#/rspec/S3346/csharp

## 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)
2023-06-28 10:19:30 +02:00
Mary Georgiou
c6678cc5ed
Modify rule S2201: LaYC format (#2301)
## 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)
2023-06-28 09:35:16 +02:00
SonarTech
62d10cce77 update coverage information 2023-06-28 00:34:51 +00:00
Yassin Kammoun
87ac00e344
Modify rule S1527: Adapt to LaYC (#2302) 2023-06-27 15:23:42 +02:00
Gregory Paidis
508c213285
Modify rule S2251: LaYC format (#2300) 2023-06-27 15:03:47 +02:00
Gregory Paidis
c26c96751c
Modify rule S1206: LaYC format (#2290) 2023-06-27 14:35:41 +02:00
Marcin Stachniuk
fbe18d2faf
Modify rule S6413: ARM improve tags and message (#2296) 2023-06-27 13:58:20 +02:00
SonarTech
e7f3cad8c1 update coverage information 2023-06-27 00:36:04 +00:00
github-actions[bot]
b6bbc08595
Create rule S6650: Renaming import, export, and destructuring assignments should not be to the same name (#2266)
https://github.com/SonarSource/SonarJS/issues/3907
2023-06-26 11:30:24 +02:00
Victor
2c0830e998
Modify rule S6479: Adapt to LaYC (#2260) 2023-06-26 09:37:25 +02:00
SonarTech
0d75b6695d update coverage information 2023-06-24 00:37:19 +00:00
Loris S
3e4f410da2
Modify S4830(php): Fix code sample (#2282) 2023-06-23 15:33:41 +02:00
github-actions[bot]
ed4e841df9
Modify rule S3363: Add C# description (#1751) 2023-06-23 12:17:50 +02:00
github-actions[bot]
18e3031f9e
Create rule S6585: Don't hardcode the format provider when turning dates and times to string (#1743) 2023-06-23 12:16:36 +02:00
Victor
889b30e2e0
Modify rule S6486: Adapt to LaYC (#2259) 2023-06-23 07:38:57 +00:00
SonarTech
b91b9826f7 update coverage information 2023-06-23 00:35:28 +00:00
Fred Tingaud
9cb6b98e41
Remove unimplemented languages/rules tagged as 'SECURITY_HOTSPOT' or 'VULNERABILITY'
Languages for which some unique descriptions remain are kept.

This cleaning removes the following rules that were implemented in no
language:
[S1947, S2085, S2086, S2609, S2610, S2614, S2643, S2773, S2776, S3268,
S3272, S3361]
2023-06-22 19:13:37 +02:00
Guillaume Dequenne
7d5ded1c39
Modify rule S2761: fix typo (#2248) 2023-06-22 17:24:32 +02:00
Guillaume Dequenne
c46884e348
Modify rule S3923: update code example for Python (#2256) 2023-06-22 17:24:10 +02:00
Victor
f79cb6898b
Modify rule S6477: Adapt to LaYC (#2249) 2023-06-22 14:15:10 +02:00
Fred Tingaud
ad4a486e52
Modify Rule S2737: LaYC catch rethrow
Co-authored-by: Amélie Renard <44666826+amelie-renard-sonarsource@users.noreply.github.com>
Co-authored-by: Dorian Burihabwa <75226315+dorian-burihabwa-sonarsource@users.noreply.github.com>
2023-06-22 14:04:34 +02:00
Fred Tingaud
83c54f9795
Handle variables *inside* an include
The point of this branch is the second commit that changes
validate_asciidoc.sh. The first one is taken from another PR and should
not be reviewed.

The previous version of the validation could handle the following case:
```asciidoc
:path: path/to/file.adoc
include::{path}[]
```

This new validation also adds support for the case of a variable inside
a path:
```asciidoc
:language: csharp
include::rules/S1000/{language}/file.adoc[]
```
2023-06-22 11:45:41 +02:00
hendrik-buchwald-sonarsource
a8961d6437
Modify rule S2755: LaYC format (#2245) 2023-06-22 11:25:00 +02:00
Marco Borgeaud
26601d83fe
Remove CFamily rules that were never implemented (#2271)
We do not plan to implement these rules as-is. Some have better
alternatives. Some will be covered by MISRA C++:2023 rules.

Co-authored-by: Fred Tingaud <frederic.tingaud@sonarsource.com>
2023-06-22 11:15:23 +02:00
Fred Tingaud
51369b610e
Make sure that includes are always surrounded by empty lines (#2270)
When an include is not surrounded by empty lines, its content is inlined
on the same line as the adjacent content. That can lead to broken tags
and other display issues.
This PR fixes all such includes and introduces a validation step that
forbids introducing the same problem again.
2023-06-22 10:38:01 +02:00
Jonas Wielage
7a3a445b51
Modify rule S1475: Fixed typo in implementation message (#2258) 2023-06-22 09:39:40 +02:00
SonarTech
83f64f8e5b update coverage information 2023-06-22 00:34:47 +00:00
Fred Tingaud
53536099a2
Fix various asciidoc mistakes 2023-06-21 16:55:34 +02:00
github-actions[bot]
ac8cd23e5b
Create rule S6647: Unnecessary constructors should be removed (#2243)
https://github.com/SonarSource/SonarJS/issues/3906
2023-06-21 16:42:01 +02:00
Tim Pohlmann
7a2b6606ba
S6640: Set quickfix to infeasible (#2261)
Modify rule S6640: Set quickfix field to infeasible
2023-06-21 15:01:27 +02:00
Tim Pohlmann
f91effd9ca
S6640 - Make code samples follow code conventions (#2253)
Modify rule S6640: Make code samples follow code conventions
2023-06-21 11:09:51 +02:00
SonarTech
86caa078a5 update coverage information 2023-06-21 00:35:56 +00:00
Loris S
1a84c758e1
Modify S4423: Learn-As-You-Code Migration (#2097)
Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
2023-06-20 15:36:01 +00:00
Victor
e6923ac8bd
Modify rule S5860: Adapt to LaYC (#2236) 2023-06-20 15:13:26 +00:00
Pavel Mikula
aba29c829d
S2925: Fix typos (#2251) 2023-06-20 16:16:29 +02:00
Antonio Aversa
1911181608
Modify rule S3776: fix why and resources (#2247) 2023-06-20 15:00:45 +02:00
hendrik-buchwald-sonarsource
d825cbc5b9
Modify rule S4830: LaYC format (#2176) 2023-06-20 13:26:14 +02:00
Loris S
e09d505103
Modify S4426: Learn-As-You-Code Migration (#2166)
## 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)

---------

Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
2023-06-20 12:08:25 +02:00
cynthiabethea
236e35ae99
Modify rule S3735: Adapt to LaYC 2023-06-20 11:20:09 +02:00
cynthiabethea
2429edf9ce
Modify rule S6325: Adapt to LaYC 2023-06-20 10:43:42 +02:00
cynthiabethea
3b655b6b90
layc-S1439-JS (#2238)
## 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: Victor <106590915+victor-diez-sonarsource@users.noreply.github.com>
2023-06-20 09:35:51 +01:00
Loris S
9e9c990658
Modify S5542: Learn-As-You-Code migration (#2011)
Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com>
2023-06-20 10:27:53 +02:00
SonarTech
020754b63e update coverage information 2023-06-20 00:33:46 +00:00
Dorian Burihabwa
20fe42abfa Modify rule S2168: Add design and singleton tags to metadata
Add the missing `design` and `singleton` tags to make the rule easier to lookup.
2023-06-19 18:18:45 +02:00
Marco Borgeaud
aefdb89382
Remove CFamily rules that are irrelevant
These rules do not make sense in C++ or are already covered by other
rules.

  S140 -- XPath, not relevant
  S1166 -- Java, we also have S2486
  S1168 -- Java
  S1444 -- Java
  S1698 -- Java
  S1944 -- Other rules: S855, S856, S859
  S2189 -- Covered by S5271
S2201 -- Relevant, although could be rephrase: Pure function should be
marked nodiscard, which is S6007
  S2251 -- The issue can detected by other means (like OOB)
  S2384 -- Java
  S3366 -- Java
  S3931 -- S1121 is more general
2023-06-19 18:18:21 +02:00
Dorian Burihabwa
74365c81fe Deprecate rule S2165 2023-06-19 18:16:55 +02:00
github-actions[bot]
a3be39441e
Create rule S6645: Variables should not be initialized to undefined (#2218)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6645/javascript)
(updated a few minutes after each push).

https://github.com/SonarSource/SonarJS/issues/3922

## 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: alexander-kamushkin-sonarsource <alexander-kamushkin-sonarsource@users.noreply.github.com>
Co-authored-by: Alexander Kamushkin <alexander.kamushkin@sonarsource.com>
2023-06-19 17:00:04 +02:00
github-actions[bot]
c92c4660be
Create rule S6644: Ternary operator should not be used instead of simpler alternatives (#2187)
You can preview this rule
[here](https://sonarsource.github.io/rspec/#/rspec/S6644/javascript)
(updated a few minutes after each push).

https://github.com/SonarSource/SonarJS/issues/3923

## 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: alexander-kamushkin-sonarsource <alexander-kamushkin-sonarsource@users.noreply.github.com>
Co-authored-by: Alexander Kamushkin <alexander.kamushkin@sonarsource.com>
2023-06-19 15:15:30 +02:00
Antonio Aversa
931f28b2e1
Modify rule S2198: change silly by unnecessary (#2234) 2023-06-19 14:26:20 +02:00
Alban Auzeill
6e6aa5a4e8
Modify rule S1849(Java): Revert title change (#2233) 2023-06-19 11:58:25 +02:00