1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-21 17:37:01 +01:00

add sonarqube to the extension (#19304)

This commit is contained in:
Pedro Figueiredo 2023-06-20 17:58:10 +01:00 committed by GitHub
parent 3e79a742c4
commit ba6a27130e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 0 deletions

22
.github/workflows/sonar.yml vendored Normal file
View File

@ -0,0 +1,22 @@
name: Sonar
on:
workflow_call:
secrets:
SONAR_TOKEN:
required: true
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for better relevancy of analysis
- name: SonarCloud Scan
# v1.9.1
uses: SonarSource/sonarcloud-github-action@5875562561d22a34be0c657405578705a169af6c
with:
args: >
-Dsonar.javascript.lcov.reportPaths=tests/coverage/lcov.info
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

18
sonar-project.properties Normal file
View File

@ -0,0 +1,18 @@
sonar.projectKey=metamask-extension
sonar.organization=consensys
# This is the name and version displayed in the SonarCloud UI.
sonar.projectName=MetaMask Extension
#sonar.projectVersion=1.0
# Root for sonar analysis.
sonar.sources=app/
# Excluded project files from analysis.
#sonar.exclusions=
# Inclusions for test files.
sonar.test.inclusions=**.test.**
# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8