13 Commits

Author SHA1 Message Date
Marco Borgeaud
8209548e54
Diff blocks: fix incorrect use for python (#2795)
Improvement identified in #2790.

Add a prefix to the diff-id when it is used multiple times in different
"how to fix it in XYZ" sections to avoid ambiguity and pedantically
follow the spec:

> A single and unique diff-id should be used only once for each type of
code example as shown in the description of a rule.

Obvious typos around `diff-type` were fixed.

An obvious extra use of diff blocks was removed.
2023-08-21 15:22:49 +02:00
John-Clifton-SonarSource
4861cfa476
Modify rule S5146: Fix invalid Python sample (#2239)
I couldn't get Sonarcloud to trigger this issue using the provided
noncompliant code example.

I think the code examples as written end up being circular because the
local function 'redirect()' will call itself rather than the imported
'redirect()' function of the same name. The fix is to change the local
function name to be redirecting(). I changed the API endpoint name as
well so that it matched. Once I had made this change, the noncompliant
code example did lead to Sonarcloud spotting the issue.

## 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-06-29 14:57:46 +01:00
Ilia Kebets
c80d7f3b4c
Add checks for education format (#1607) 2023-03-07 17:16:47 +01:00
pedro-oliveira-sonarsource
b48fbbc971 Modify S5146(multiple languages): Update to the education framework (APPSEC-185) (#1330) 2023-03-02 18:22:24 +01:00
pedro-oliveira-sonarsource
babbfeceb6 [APPSEC-57] Modify rule S5146: Educational content (Commons) (#1132) 2023-03-02 18:07:54 +01:00
hendrik-buchwald-sonarsource
1e8216f005
Modify rule S5146: Fix incorrect Java code sample (#1129) 2022-08-01 15:20:33 +02:00
Fred Tingaud
b4161466e6
RULEAPI-661: Add syntax coloring 2022-02-04 16:28:24 +00:00
Pierre-Loup
2378417fdd
Modify rule S5146 - Support Location header (#315) 2021-11-05 13:12:29 +00:00
Arseniy Zaostrovnykh
f7904cebe7
RULEAPI-666: Migrate the "List of parameters", "Highlighting" and "Message" fields from jira RSPEC (#346) 2021-09-20 13:38:42 +00:00
Arseniy Zaostrovnykh
716b335a56 Enable forced linebreaks in quotes; escape -- in url 2021-02-02 16:54:43 +01:00
Arseniy Zaostrovnykh
7ca29f686f Force linebreaks 2021-02-02 15:02:10 +01:00
Alban Auzeill
2c306d110e Fix code block ambiguity with old header style
Ensure blank line before list and clean the one leading space
2020-06-30 17:16:12 +02:00
Alban Auzeill
0329b1564c Add rules 5000-5999 2020-06-30 17:16:12 +02:00