diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml new file mode 100644 index 000000000..ae75a4859 --- /dev/null +++ b/.github/workflows/sonar.yml @@ -0,0 +1,21 @@ +name: Scan SonarCloud + +on: + push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened] + +jobs: + sonarqube: + name: SonarQube + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: SonarQube Scan + uses: SonarSource/sonarqube-scan-action@v6 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/components.json b/components.json index fd5076fbd..0b4ee631e 100644 --- a/components.json +++ b/components.json @@ -14,3 +14,4 @@ "utils": "@/lib/utils" } } + diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 000000000..fd27cf6b1 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,13 @@ +properties +sonar.projectKey=Arthur8525_split +sonar.organization=Arthur8525 + +# Caminho do código fonte +sonar.sources=src + +# Arquivos a excluir +sonar.exclusions=**/node_modules/**,**/dist/**,**/coverage/**,**/public/** + +# Encoding of the source code. Default is default system encoding +sonar.sourceEncoding=UTF-8 +sonar.typescript.tsconfigPath=tsconfig.json