Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 5a7a3b60 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Update sonar script

parent ba412cd6
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
#!/usr/bin/env bash
###
#
# @file analysis.sh
# @copyright 2019-2021 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
# Univ. Bordeaux. All rights reserved.
#
# @version 1.0.0
# @author Mathieu Faverge
# @date 2021-03-25
#
###
# Performs an analysis of HQR source code:
# - we consider to be in HQR's source code root
......@@ -16,7 +27,7 @@ rm -f filelist.txt
git ls-files | grep "\.[ch]$" > filelist.txt
# Generate coverage analysis report
lcov_cobertura.py hqr.lcov --output hqr-coverage.xml
python3 /usr/local/lib/python3.8/dist-packages/lcov_cobertura.py hqr.lcov --output hqr-coverage.xml
# to get it displayed and captured by gitlab to expose the badge on the main page
cat ./hqr-gcov.log
......@@ -38,16 +49,15 @@ cat > sonar-project.properties << EOF
sonar.host.url=https://sonarqube.inria.fr/sonarqube
sonar.login=$SONARQUBE_LOGIN
sonar.links.homepage=https://gitlab.inria.fr/solverstack/hqr
sonar.links.scm=https://gitlab.inria.fr/solverstack/hqr.git
sonar.links.ci=https://gitlab.inria.fr/solverstack/hqr/pipelines
sonar.links.issue=https://gitlab.inria.fr/solverstack/hqr/issues
sonar.links.homepage=$CI_PROJECT_URL
sonar.links.scm=$CI_REPOSITORY_URL
sonar.links.ci=$CI_PROJECT_URL/pipelines
sonar.links.issue=$CI_PROJECT_URL/issues
sonar.projectKey=$SONARQUBE_PROJECTKEY
sonar.projectDescription=Library for hierarchical QR/LQ reduction trees
sonar.projectVersion=master
sonar.language=c
sonar.sources=include, src, testings
sonar.inclusions=`cat filelist.txt | xargs echo | sed 's/ /, /g'`
sonar.sourceEncoding=UTF-8
......@@ -59,7 +69,10 @@ sonar.c.compiler.reportPath=hqr-build.log
sonar.c.coverage.reportPath=hqr-coverage.xml
sonar.c.cppcheck.reportPath=hqr-cppcheck.xml
sonar.c.rats.reportPath=hqr-rats.xml
sonar.c.jsonCompilationDatabase=build/compile_commands.json
sonar.c.jsonCompilationDatabase=${BUILDDIR}/compile_commands.json
sonar.lang.patterns.c++: **/*.cxx,**/*.cpp,**/*.cc,**/*.hxx,**/*.hpp,**/*.hh
sonar.lang.patterns.c: **/*.c,**/*.h
sonar.lang.patterns.python: **/*.py
EOF
# run sonar analysis + publish on sonarqube-dev
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment