Skip to content

Per #2379, move more config logic from sonar-project.properties into … #3

Per #2379, move more config logic from sonar-project.properties into …

Per #2379, move more config logic from sonar-project.properties into … #3

Workflow file for this run

name: SonarQube Static Code Analysis
# Run SonarQube for Pull Requests and changes to the develop and main_vX.Y branches
on:
# Trigger analysis for pushes to develop and main_vX.Y branches
# TODO: Remove feature_2379_sonarqube_gha prior to submitting PR
push:
branches:
- develop
- 'main_v**'
- feature_2379_sonarqube_gha
paths-ignore:
- 'docs/**'
- '.github/pull_request_template.md'
- '.github/ISSUE_TEMPLATE/**'
- '.github/labels/**'
- '**/README.md'
- '**/LICENSE.md'
# Trigger analysis for pull requests to develop and main_vX.Y branches
pull_request:
types: [opened, synchronize, reopened]
branches:
- develop
- 'main_v**'
- feature_2379_sonarqube_gha
paths-ignore:
- 'docs/**'
- '.github/pull_request_template.md'
- '.github/ISSUE_TEMPLATE/**'
- '.github/labels/**'
- '**/README.md'
- '**/LICENSE.md'
# Add manual trigger
workflow_dispatch:
jobs:
scan_c++:

Check failure on line 41 in .github/workflows/sonarqube.yml

View workflow run for this annotation

GitHub Actions / SonarQube Static Code Analysis

Invalid workflow file

The workflow is not valid. .github/workflows/sonarqube.yml (Line: 41, Col: 3): The identifier 'scan_c++' is invalid. IDs may only contain alphanumeric characters, '_', and '-'. IDs must start with a letter or '_' and and must be less than 100 characters.

Check failure on line 41 in .github/workflows/sonarqube.yml

View workflow run for this annotation

GitHub Actions / SonarQube Static Code Analysis

Invalid workflow file

The workflow is not valid. .github/workflows/sonarqube.yml (Line: 41, Col: 3): The identifier 'scan_c++' is invalid. IDs may only contain alphanumeric characters, '_', and '-'. IDs must start with a letter or '_' and and must be less than 100 characters.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: SonarQube C++ Scan
uses: sonarsource/sonarqube-scan-action@master
with:
projectBaseDir: src
args: >
-Dsonar.cfamily.build-wrapper-output=bw-outputs
-Dsonar.sourceEncoding=UTF-8
-Dsonar.verbose=true
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
scan_python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: SonarQube Python Scan
uses: sonarsource/sonarqube-scan-action@master
with:
projectBaseDir: scripts/python,data/wrappers
args: >
-Dsonar.python.version=3.6.3
-Dsonar.sourceEncoding=UTF-8
-Dsonar.verbose=true
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}