WIP: [CI] Integrate SonarCloud to the repository #5845
73
.github/workflows/sonar-analyze.yml
vendored
Normal file
|
@ -0,0 +1,73 @@
|
|||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
name: SonarCloud
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
on:
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
push:
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
rtsisyk
commented
let's configure it for workflow_dispatch (manual invocation) for now. let's configure it for workflow_dispatch (manual invocation) for now.
|
||||
branches:
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
- master
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
pull_request:
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
types: [opened, synchronize, reopened]
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
jobs:
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
build:
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
name: Build and analyze
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
runs-on: ubuntu-24.04
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
env:
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
steps:
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
- name: Free disk space by removing .NET, Android and Haskell
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
shell: bash
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
run: |
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
- name: Checkout sources
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
uses: actions/checkout@v4
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
with:
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
fetch-depth: 100 # enough to get all commits for the current day
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
- name: Parallel submodules checkout
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
shell: bash
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
- name: Install sonar-scanner and build-wrapper
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
uses: SonarSource/sonarcloud-github-c-cpp@v3
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
- name: Install build tools and dependencies
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
shell: bash
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
run: |
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
sudo apt update -y
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
sudo apt install -y \
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
ninja-build \
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
qt6-base-dev \
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
qt6-positioning-dev \
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
libgl1-mesa-dev \
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
libglvnd-dev \
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
libqt6svg6-dev \
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
libfreetype6-dev \
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
libharfbuzz-dev \
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
libqt6positioning6-plugins \
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
libqt6positioning6
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
- name: Configure
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
shell: bash
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
run: ./configure.sh
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
- name: Configure ccache
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
with:
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
key: ${{ github.workflow }}
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
- name: CMake
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
shell: bash
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
env:
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
CC: clang-18
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
CXX: clang++-18
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
CMAKE_C_COMPILER_LAUNCHER: ccache
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
CMAKE_CXX_COMPILER_LAUNCHER: ccache
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
# -g1 should slightly reduce build time.
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
run: |
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-g1 -DCMAKE_CXX_FLAGS=-g1
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
- name: Run build-wrapper
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
run: |
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} ninja -C build/
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
- name: Run sonar-scanner
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
env:
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
run: |
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
||||
sonar-scanner -X --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
|
||||
AndrewShkrob
commented
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c ```suggestion
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
```
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c
|
5
sonar-project.properties
Normal file
|
@ -0,0 +1,5 @@
|
|||
rtsisyk
commented
```suggestion
sonar.organization=organicmaps
```
rtsisyk
commented
https://sonarcloud.io/project/overview?id=organicmaps_organicmaps ```suggestion
sonar.projectKey=organicmaps
```
https://sonarcloud.io/project/overview?id=organicmaps_organicmaps
rtsisyk
commented
```suggestion
sonar.organization=organicmaps
```
rtsisyk
commented
https://sonarcloud.io/project/overview?id=organicmaps_organicmaps ```suggestion
sonar.projectKey=organicmaps
```
https://sonarcloud.io/project/overview?id=organicmaps_organicmaps
|
||||
sonar.organization=organicmaps
|
||||
rtsisyk
commented
```suggestion
sonar.organization=organicmaps
```
rtsisyk
commented
https://sonarcloud.io/project/overview?id=organicmaps_organicmaps ```suggestion
sonar.projectKey=organicmaps
```
https://sonarcloud.io/project/overview?id=organicmaps_organicmaps
|
||||
sonar.projectKey=organicmaps
|
||||
rtsisyk
commented
```suggestion
sonar.organization=organicmaps
```
rtsisyk
commented
https://sonarcloud.io/project/overview?id=organicmaps_organicmaps ```suggestion
sonar.projectKey=organicmaps
```
https://sonarcloud.io/project/overview?id=organicmaps_organicmaps
|
||||
|
||||
rtsisyk
commented
```suggestion
sonar.organization=organicmaps
```
rtsisyk
commented
https://sonarcloud.io/project/overview?id=organicmaps_organicmaps ```suggestion
sonar.projectKey=organicmaps
```
https://sonarcloud.io/project/overview?id=organicmaps_organicmaps
|
||||
sonar.sources=base/,coding/,cppjansson/,descriptions/,drape/,drape_frontend/,editor/,feature_list/,ge0/,generator/,geometry/,indexer/,kml/,map/,mapshot/,openlr/,platform/,poly_borders/,qt/,qt_tstfrm/,routing/,routing_common/,search/,shaders/,skin_generator/,software_renderer/,std/,storage/,topography_generator/,track_analyzing/,track_generator/,tracking/,traffic/,transit/
|
||||
rtsisyk
commented
```suggestion
sonar.organization=organicmaps
```
rtsisyk
commented
https://sonarcloud.io/project/overview?id=organicmaps_organicmaps ```suggestion
sonar.projectKey=organicmaps
```
https://sonarcloud.io/project/overview?id=organicmaps_organicmaps
|
||||
sonar.exclusions=3party/**,android/**,cmake/**,data/**,docs/**,iphone/**,packaging/**,pyhelpers/**,testing/**,xcode/**
|
||||
rtsisyk
commented
```suggestion
sonar.organization=organicmaps
```
rtsisyk
commented
https://sonarcloud.io/project/overview?id=organicmaps_organicmaps ```suggestion
sonar.projectKey=organicmaps
```
https://sonarcloud.io/project/overview?id=organicmaps_organicmaps
|
From this example: https://github.com/marketplace/actions/sonarcloud-scan-for-c-and-c