diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml new file mode 100644 index 00000000..ae75a485 --- /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/sonar-project.properties b/sonar-project.properties new file mode 100644 index 00000000..02b1ee5c --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,13 @@ +properties +sonar.projectKey=YagoChaves_spliit +sonar.organization=yagochaves + +# 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