Skip to content

Commit

Permalink
add sonarqube to the extension (MetaMask#19304)
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronfigueiredo authored Jun 20, 2023
1 parent 3e79a74 commit ba6a271
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 18 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit ba6a271

Please sign in to comment.