Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/sonar.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
on:
# trigger analysis for pushes and pull requests
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]

name: SonarQube Main Workflow

jobs:
sonarqube:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# fetch full history for better SCM information
fetch-depth: 0

- name: Run SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

- name: Quality Gate check
uses: sonarsource/sonarqube-quality-gate-action@master
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
21 changes: 21 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Server and project configuration
# Note: SONAR_HOST_URL secret in the workflow takes precedence at scan time.
# This entry documents the expected host and is a no-op when the secret is set.
sonar.host.url=https://sonar.wpengine.io/
sonar.projectVersion=1.0
sonar.sourceEncoding=UTF-8
sonar.scm.provider=git

# Project Identifiers
sonar.projectName=local-addon-notes
sonar.projectKey=getflywheel_local-addon-notes_353f0d7e-470a-455f-9210-df9fd02b6013

# Paths to source code directories and files (relative paths)
sonar.sources=src,style.css,assets

# Exclusions - test files + vendor/build dirs + auto-generated code
sonar.exclusions=**/*.test.*,**/*.spec.*,node_modules/**,lib/**,dist/**,build/**,coverage/**,.nyc_output/**

# Paths to test source directories (relative paths)
sonar.tests=src
sonar.test.inclusions=**/*.test.*,**/*.spec.*
Loading