Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/94 compatibility matrix #106

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

luka-wernig
Copy link
Contributor

Add the five remaining checks (markdown-lint, stylelint, gixy, sonar-scanner, snyk) to the compatibility matrix.
The checks are going to have to also be added to results_summary.py so as to avoid the
"Not fully supported yet" status.
In sonar_scanner.py the -Dsonar.login= argument should be fixed to -Dsonar.token=.
At the moment Gixy requires Nginx to be installed to work, this is still yet to be fixed.

Update compatibility with Gixy, Stylelint and Markdow-lint. Snyk and
Sonar-scanner are still yet to be added.
After updating the
compatibility matrix, the results_summary.py should also be updated
so that the correct "status" message will be displayed after the linter
is used in the scan.
They support checking through "node_modules", which then runs
the check across the entire project.
Setup for using Snyk:
 - Create a Snyk account
 - Skip the creating a project process
 - Go to Account Settings (In the bottom left) > General
 - Save and use the API token as a secret in the Snyk configuration

Setup for using SonarScanner:
 - Download sonar from [here](https://www.sonarsource.com/products/sonarqube/downloads/)
 - Go to sonarqube-<version>/bin/<your-os>/
 - Run sonar.sh if you're on Linux/MacOS or StartSonar.bat if you're
 on windows
 - Set your credentials
 - Create a project (select manually, not through a devops platform)
 - Set a display name and a **project_key**
 - Now that you have a project created go to My Account > Security
 - Create a user_token (starts with "squ" and is used for authentication
 in configuration)
 - The configuration secret will be the user_token
 - The config file should contain at least:
    ```
    sonar.host.url=     # http://localhost:9000/ if being run locally
    sonar.projectKey=   # The **project_key** created earlier
    ```

In the current state of sonar_scanner.py, the following warning is going
to be issued during the scan:
> WARN: The property 'sonar.login' is deprecated and will be removed in
> the future. Please use the 'sonar.token' property
> instead when passing a token.

This is easily fixed by changing the `-Dsonar.login=` part in
`sonar_scanner.py`'s run_command to `-Dsonar.token=`.

In the case of sonar-scanner, the results of your scan are also going to
be visible on http://localhost:9000/.
@luka-wernig luka-wernig added the bug Something isn't working label Sep 27, 2023
@luka-wernig luka-wernig self-assigned this Sep 27, 2023
@luka-wernig luka-wernig linked an issue Sep 27, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade compatibility matrix
1 participant