36 Commits

Author SHA1 Message Date
Marco Borgeaud
b16a5e7ee9
Add minimal config for Codespaces (#4406)
Make it easier to use Codespace to develop rspec-tools by reusing the Dockerfile for the CI.
2024-10-11 09:22:09 +02:00
Fred Tingaud
3e3f54d821
Merge all rule validation scripts under a single task (#4255)
We shouldn't clone the whole repository three times to run three scripts that each take a few seconds.
2024-09-10 11:15:30 +02:00
Fred Tingaud
3dacb3feb1
Avoid race condition on validate_links cache 2024-09-09 15:20:34 +02:00
Marco Borgeaud
997bd49f75 Improve cirrus-cache.sh
Print md5 as part of cache scripts.
Address spellcheck issues (quote variables).
Remove dead variables.
Improve output in general and pipe errors to stderr.
Fully spell out curl options for better readability.
Always show error with curl.
2024-08-22 09:59:26 +02:00
Mate Molnar
7d64c96a75 Revert "BUILD-4733: Use COVERAGE_GITHUB_TOKEN from the vault instead of the default GITHUB_TOKEN"
This reverts commit 9a14e956754adfffdfb53bd22d4a230cb97acaae.
2024-07-17 10:38:43 +02:00
Tom
9a14e95675 BUILD-4733: Use COVERAGE_GITHUB_TOKEN from the vault instead of the default GITHUB_TOKEN 2024-07-05 17:01:17 +02:00
Marcin Stachniuk
10b4c2cec6
Fix Azure Resource Manager rules coverage (#3853)
* Fix Azure Resource Manager rules coverage

* Fix Azure Resource Manager rules coverage
2024-04-10 08:50:17 +02:00
Arseniy Zaostrovnykh
162b408c10
Use newer sonar-scanner to get Java 17 required for Sonar analysis 2023-12-06 09:35:32 +00:00
Fred Tingaud
d3cfe19d7e
Fix broken or dangerous backquotes
Co-authored-by: Marco Borgeaud <89914223+marco-antognini-sonarsource@users.noreply.github.com>
2023-10-30 10:33:56 +01:00
Cristian Ambrosini
ea83931eb0
Add CI task to validate file extension (#3196)
The dotnet squad would like to improve the rule specification sprint
process requiring some UTs to be temporarily added under the rule folder
on RSPEC repository. These test case files (`.cs` and `.vb`) will be
copied to the sonar-dotnet repository during the initial phases of
implementation and will serve as an initial test bed.
However, before merging the PR on the RSPEC side we need to make sure
that these test case files are deleted and they don't end up on master.

The goal of this PR would be to add a check on the pipeline that will
fail if `.cs` or `.vb` files are detected (it's acceptable if it's red
until the implementation is done).
2023-10-09 10:37:38 +02:00
Marco Borgeaud
f57a9805b5
RULEAPI-788 Validate use of diff-id and diff-type (#2790)
The validation is not yet enabled on CI checks because there exist too many errors in existing rule descriptions at the moment.
2023-08-10 09:59:44 +02:00
Marco Borgeaud
6398acacd9
Add CI task to test CI tests (#2768)
Extract the bits using the custom asciidoctor to a dedicated file.
This new script uses `set -e` to catch unexpected errors.
It is also covered with integration tests that get executed on the CI.

This serves as the groundwork to integrate more advanced validation
tests.
2023-08-03 17:21:40 +02:00
Marco Borgeaud
a523a5d6e4
Do not clone the repo in all_required_checks_task
Save about 20s of CPU time on each commit/PR.
2023-08-02 09:03:03 +02:00
Evgeny Mandrikov
1bcb77ca16
Remove unused gcp_credentials
This was forgotten in e6ca2653ca7145ee71ddd37bac3ff6def7f69e81
2023-05-26 16:14:25 +02:00
tomverin
ead234e825
BUILD-1970 Use Vault 2023-05-26 15:29:37 +02:00
Vladimír Kopčil
e6ca2653ca BUILD-2318: Migrate to CirrusCI on AWS 2022-12-14 15:50:56 +01:00
Arseniy Zaostrovnykh
6800da7e05
RULEAPI-762: Fix link-probing cache: cache on failure and success 2022-06-08 13:52:21 +02:00
tomverin
fc94435299
BUILD-1577 migrate to new infra and BUILD-1551 update repox credentials 2022-05-31 14:12:36 +02:00
Marco Antognini
02cae0ceb0
Fix SonarQube warning about missing reference for analysis (#796) 2022-03-08 10:31:27 +00:00
Arseniy Zaostrovnykh
2d6b5df540
Define all_required_checks task as the convenient waiting point (#813)
`update_coverage` action used to wait for `validate_asciidoc` to succeed as the task that takes the longest. After #782 is merged as f21f23b9860c10d4effb00b6022917bc28e02e61 it is no longer the case. This change introduces `all_required_checks` task that depends on all checks required for a PR to be merged, thus providing a single point that is known to succeed last and can be safely waited upon.
2022-02-11 09:35:24 +01:00
Arseniy Zaostrovnykh
96aa68e8a2
See if we can detect open handles
`frontend_tests` task sometimes gets stuck and timeouts after all the tests are actually passed. `--detectOpenHandles` option might help to investigate why the test does not finish cleanly.
2022-02-04 19:05:45 +00:00
Arseniy Zaostrovnykh
04655f1ee7
Bump mem limit for metadata validation task (#784)
1G is not enough for pipenv to install all the dependencies
2022-02-04 16:48:10 +01:00
Marco Antognini
77ebfe0984
Quick-fix for frontend testing's bad mock of fs.existsSync (#783) 2022-02-04 14:51:25 +00:00
Arseniy Zaostrovnykh
67b482b82d
Use full clone for tests to enable proper new-code detection on SonarQube (#781) 2022-02-04 14:19:53 +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
tomasz-kaminski-sonarsource
fb4391ec23
RULEAPI-579: Enable project analysis in SonarQube Next (#693) 2022-01-12 14:45:44 +00:00
Pierre-Loup
56832b65c6
Fix "pipenv install" invocation to avoid update of Pipfile.lock (#561) 2021-11-01 14:43:11 +01:00
Arseniy Zaostrovnykh
0fe8dffe85
RULEAPI-573: Clean and test script generating for each rule the list of plugins covering it (#429) 2021-10-01 14:52:12 +02:00
Arseniy Zaostrovnykh
2784140e8b
RULEAPI-646: Speed up the "validate_asciidoc" check by validating only the changed rules 2021-06-09 11:15:47 +02:00
Arseniy Zaostrovnykh
16ca5fafaf
RULEAPI-649: Add frontend tests to CI 2021-06-08 15:21:29 +02:00
Arseniy Zaostrovnykh
4ad44aee5b
RULEAPI-616: Stabilize the link validation CI check by preserving the probing results between runs 2021-06-03 16:04:36 +02:00
Tom
64ccf6ec99 Bump CI worker to 2g of ram for checklinks 2021-02-25 16:21:19 +01:00
nicolas-harraudeau-sonarsource
763c935b63
Improve rules' metadata.json validation 2021-02-23 20:41:11 +01:00
tomverin
e8530167f5
Check links embeded in adocs files (#32) 2021-02-12 15:18:24 +01:00
Tom
cec10835b2 Add missing newlines 2020-06-23 12:02:19 +02:00
Tom
df7df72e21 Add tests 2020-06-23 11:56:24 +02:00