提交 e1254328 创建 作者: 宋海霞's avatar 宋海霞

modify

上级 d6eb8b20
image: "registry.cn-hangzhou.aliyuncs.com/engintime/ubuntu_16.04_program:latest"
stages:
- make
- code-analysis
- case1
- teacher-check
......@@ -18,6 +19,20 @@ make:
only:
- master
code-analysis:
stage: code-analysis
<<: *codecode-runner
script:
- make
- mkdir -p build
- cppcheck -v --force --enable=all --xml -I./ ./ 2> ./build/cppcheck-report.xml
- bash -c 'find ./ -regex ".*\.c\|.*\.h" | vera++ -S -s -d -c ./build/vera-report.xml'
- valgrind --xml=yes --xml-file=./build/valgrind-report.xml ./app
- sonar-scanner -Dsonar.projectKey=ProjectKey-$CI_PROJECT_ID -Dsonar.projectName=$CI_PROJECT_NAME -Dsonar.links.homepage=$CI_PROJECT_URL -Dsonar.host.url=$SONAR_URL -Dsonar.login=$SONAR_LOGIN -Dsonar.gitlab.commit_sha=$CI_COMMIT_SHA -Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME -Dsonar.gitlab.project_id=$CI_PROJECT_ID -Dsonar.gitlab.url=$CODECODE_PROTOCOL$CODECODE_DOMAIN
allow_failure: true
only:
- master
case1:
stage: case1
<<: *codecode-runner
......@@ -37,6 +52,7 @@ teacher-check:
- ./app
- git clone ${CODECODE_PROTOCOL}gitlab-ci-token:${CI_JOB_TOKEN}@${CODECODE_DOMAIN}/${CI_PROJECT_FORKSOURCE} template
- diff template/.gitlab-ci.yml .gitlab-ci.yml -b -B -y -i --suppress-common-lines
- diff template/sonar-project.properties sonar-project.properties -b -B -y -i --suppress-common-lines
- diff template/output.txt output.txt -b -B -y -i --suppress-common-lines
- fileidentity.sh
only:
......
# required metadata
sonar.language=c
# path to source directories (required)
sonar.sources=./
# path to the build artifact
sonar.artifact.path=build/app
# paths to the reports
sonar.c.cppcheck.reportPath=./build/cppcheck-report.xml
#sonar.c.pclint.reportPath=./build/pclint-report.xml
#sonar.c.coverage.reportPath=./build/gcovr-report*.xml
#sonar.c.coverage.itReportPath=./build/gcovr-report*.xml
#sonar.c.coverage.overallReportPath=./build/gcovr-report*.xml
sonar.c.valgrind.reportPath=./build/valgrind-report.xml
sonar.c.vera.reportPath=./build/vera-report.xml
#sonar.c.rats.reportPath=./build/rats-report.xml
#sonar.c.xunit.reportPath=./build/xunit-report.xml
#sonar.c.drmemory.reportPath=./build/drmemory-logs/**/results.txt
sonar.c.includeDirectories=/usr/include/,/usr/include/linux,/usr/include/x86_64-linux-gnu/bits,/usr/include/x86_64-linux-gnu/sys,/usr/include/c++/5/tr1,./
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论