98 Commits

Author SHA1 Message Date
Fred Tingaud
a1090dca6c
Clean warnings 2023-12-22 14:18:33 +01:00
Fred Tingaud
aa079ad714
Don't crash when the asciidoc logger receives a string
The asciidoc documentation states that the logger will receive objects
with a given interface, but sometimes we receive simple strings that
crash the documented code.
2023-11-06 18:12:17 +01:00
Fred Tingaud
0cfa2cb41f
Fix Sonar warning. 2023-11-06 10:19:09 +01:00
Arseniy Zaostrovnykh
3dd5a4950c
Update ts-node to fix the build 2023-10-17 09:58:33 +02:00
Arseniy Zaostrovnykh
acdfc35f45
Update NPM packages
This is an automatic update of the package + a fix for a type error that
is detected with the newer typescript compiler.
I did this hoping to address the Dependabot concerns, but the update
didn't go far enough.
The type fix changes the type or error in `useFetch` from "unknown" to a
boolean (has error / no error), which is how we use it as far as I can
tell.
2023-10-16 16:01:08 +02:00
Fred Tingaud
40852c33d9
Frontend: Simplify the code a little 2023-09-27 10:22:15 +02:00
Fred Tingaud
e261bd4b21
Fix Sonar warnings
Fix a bunch of Sonar warnings that somehow appear as "New warnings"
although they are a few years old.
2023-09-22 14:41:56 +00:00
Arseniy Zaostrovnykh
55720d6cda
Fix rule coverage on a rule page: include all rule keys to metadata
For some rules, rule-specific metadata.json overridden the `sqKey` for
all languages, so when the predeployment script collected all keys, it
did not list the actual, most canonical key "S****".
This leads to the incorrect display of coverage information on a rule
page that relies on the `allKeys` precomputed property to retrieve the
version of the analyzer that implements the rule.

The fix includes the generic rule metadata.json file into the aggregator
that computes `allKeys`, thus propagating it to every language-specific
metadata.
2023-08-21 07:45:14 +00:00
Amélie Renard
4698df5e2e
CPP-3691 Remove "MISRA C++ 2008 recommended" and "MISRA C++ 2008" quality profiles from all RSPECs 2023-08-10 17:32:11 +02:00
Arseniy Zaostrovnykh
b2e8d8ea56
Focus the search input on search-page load 2023-07-12 16:43:28 +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
Arseniy Zaostrovnykh
d206474dd2
Fix the bugs and codesmells reported by SC on the search page 2023-05-19 08:57:30 +02:00
tomasz-kaminski-sonarsource
402c7a2f33
PR-preveiw: Propery handle situation when there is more than 100 PRs (#1885)
The result is automatically paginated if the number is greater than the
maximum per_page count, which is 100.
2023-05-15 12:55:29 +02:00
Rudy Regazzoni
31f3a23b45
Add language AzureResourceManager as a supported language (#1827) 2023-05-04 11:55:34 +02:00
Christophe Zürn
45e7d3b4e0
Frontend deployment ignores the 'common' utility folder in rules directories (#1606) 2023-03-03 13:49:24 +01:00
Nils Werner
8059dc77b1
Modify rule S2260: Add Docker as new language (RULEAPI-773) (#1391) 2022-11-14 17:33:51 +01:00
Arseniy Zaostrovnykh
84967d6c25
Prohibit non-ASCII characters in rule metadata.json files (#1119)
Triggered by the deployment failure that was caused by an invisible Unicode character in a rule's metadata.json.
This PR implements three conceptual changes:
- make the deployment parse error more informative
- prohibit the use of non-ASCII characters in the metadata.json files
- remove the existing non-ASCII characters from the existing rules
2022-07-25 17:19:53 +02:00
Loris S
33aaca1316
RULEAPI-760: Add a new language identifier for kubernetes rules (#992) 2022-05-25 10:04:20 +02:00
Arseniy Zaostrovnykh
fe2fa30973
RULEAPI-752 enable search by legacy keys 2022-03-28 11:19:58 +02:00
Marco Antognini
2e7f232913
RULEAPI-633: Autolink RSPECs 2022-02-07 18:16:41 +00:00
Fred Tingaud
b4161466e6
RULEAPI-661: Add syntax coloring 2022-02-04 16:28:24 +00:00
Marco Antognini
77ebfe0984
Quick-fix for frontend testing's bad mock of fs.existsSync (#783) 2022-02-04 14:51:25 +00:00
Marco Antognini
b181aad484
Fix code smells in index.ts (#776) 2022-02-03 17:27:40 +01:00
Marco Antognini
1e719adea0
RULEAPI-726: Add end-to-end testing
* Increase timeout for CI
2022-02-03 10:15:10 +00:00
Fred Tingaud
7d868d3f35
Use a more readable form to display parameters 2022-02-01 12:25:23 +00:00
Fred Tingaud
500a488b04
RULEAPI-724: Strikethrough rule ID if the rule is closed, deprecated, or removed 2022-01-31 18:44:44 +00:00
Fred Tingaud
5a68d54bbe
RULEAPI-732: Don't use chips for the status titles in search page 2022-01-31 10:46:01 +00:00
Fred Tingaud
cfe0e34962
RULEAPI-729: Reduce title fonts to make the page more readable 2022-01-28 14:17:25 +00:00
Marco Antognini
b2b116a8e2
RULEAPI-682: Index multiple types and rules with no languages
* Generate description and metadata for rules with no language, so that they get indexed.
* Index rules with different types in language specializations.
* Improve validation to reject new rules with no language specialization (i.e. only a predefined set of such rules is allowed because they were imported from Jira and kept for historical purposes).
* Write smaller JSON files, reduce their size by 30%.
* Improve test coverage of CLI application.
2022-01-28 09:51:13 +01:00
Fred Tingaud
c5c784a818
RULEAPI-731: Make the search bar more compact to leave room for the results (#753) 2022-01-27 13:45:19 +00:00
Arseniy Zaostrovnykh
50433083fd
RULEAPI-728: When pressing enter in the search bar and there is a perfect match, open it (#750) 2022-01-26 18:14:55 +01:00
Arseniy Zaostrovnykh
b5357b1e1a
RULEAPI-727: Add interactions tests (#746) 2022-01-26 13:39:04 +00:00
Marco Antognini
d1e5484b80
Fix search per language
Rename field to clarify intent.
Index only the name of the language.
Use lunr extractor.
2022-01-19 17:12:31 +00:00
Fred Tingaud
ecea86e876
Update dependencies and simplify predeploy (#723) 2022-01-18 15:30:19 +00:00
Fred Tingaud
c8c825feb0
RULEAPI-705 differentiate closed and obsolete rules in the UI (#704) 2022-01-17 20:13:15 +01:00
Nils Werner
b46b76025c
Rename 'Common' to 'Text' (#714) 2022-01-17 17:05:01 +01:00
Arseniy Zaostrovnykh
4c3b75b4ce
Fix the snapshot resulted from the merge (#716)
The broken UI test on master is the result of a temporal relaxation of the policy of "merge only PRs that are up-to-date with master": a snapshot-based test was introduced in one PR (#709) and was passing, and a UI change was introduced in another PR(#715) that changed the snapshot (but was not covered by the test at the time the second PR diverged from master)
2022-01-14 17:27:24 +00:00
Arseniy Zaostrovnykh
09f8c0b9f2
RULEAPI-571: test the UI components (#709) 2022-01-14 16:07:50 +00:00
Marco Antognini
105f563bb5
RULEAPI-703: Fix warnings emitted during npm run predeploy
Parse custom string instead of file and explicitly introduce level-1
section so that asciidoctor sees it.
2022-01-14 16:06:36 +00:00
Arseniy Zaostrovnykh
0223c2a00d
Fix UI warnings: <div> nested in <p> and list items lacking keys (#708)
Fix the two warnings observed when testing the SearchPage component:

- Each child in an array should have a unique "key" prop.
  -> add a key prop to list items
- <div> cannot be nested in <p> (or sth to that effect)
  -> change the relevant Typography components from "p" to "div"
2022-01-13 17:41:44 +01:00
Arseniy Zaostrovnykh
b335def299
Fix the frontend warnings (#696)
Two warnings descovered when trying to test RulePage component:
- `<div>` nested in `<p>`
- `<Tabs>` component with contradictory attributes: `centered` and `scrollable`
2022-01-12 17:52:35 +00:00
Arseniy Zaostrovnykh
a32b29744e
RULEAPI-571: Increase test coverage of the GitHub Page (#692) 2022-01-12 15:58:15 +00:00
Nils Werner
0153e37597
RULEAPI-715: Add the "common" language (#632) 2021-12-01 15:18:31 +00:00
Elena Vilchik
af599ec877
Add comment for the rule coverage logic (#446) 2021-10-01 14:33:45 +00:00
Elena Vilchik
84fb0a245c
RULEAPI-697 Display if rule is removed for some language 2021-10-01 15:47:43 +02:00
Arseniy Zaostrovnykh
a774d17f29
RULEAPI-700: fix odd highlighting for selected segment of metadata (#437) 2021-10-01 09:28:57 +02:00
Arseniy Zaostrovnykh
8d21500f3b
RULEAPI-700 Highlight the metadata JSON on the rule page (#432) 2021-09-30 17:15:45 +02:00
Arseniy Zaostrovnykh
2d3a3098c5
Use GITHUB_TOKEN for PR crawler to escape GitHub throttling (#430) 2021-09-30 14:48:04 +02:00
Elena Vilchik
1d44a68991
RULEAPI-688 Display covered languages on search page 2021-09-30 12:20:26 +02:00
Arseniy Zaostrovnykh
79e776ed8d
RULEAPI-691: Rule coverage: Track the last version of an analyzer implementing a rule along with the first version 2021-09-30 10:59:30 +02:00