Hello everyone,
This is my first post as a SonarCloud project administrator. So far, I was just a regular user of this tool. The project that I am trying to set up is a private C++ project on GitHub.
I have some folders (mainly third-parties) to exclude from the Sonar analysis, I create a sonar-project.properties and set the sonar.exclusions property. Because of this, I had to disable automatic analysis and setup a GitHub action as explained in the tutorial.
Here is my yaml file:
name: Build
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install sonar-scanner and build-wrapper
uses: SonarSource/sonarcloud-github-c-cpp@v1
- name: Build
run: |
cmake --preset configure-default
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build --preset build-default
But I am facing some issues now:
- There is no Sonar analysis of the new code in my pull request (in automatic way, Sonar posts a comment with an analysis of the new code)
- I find neither my dev branch or my pull request in my Sonar project.
Can you help me to fix it please?
Thank you.