Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Beyond Protocol
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Beyond AKA
Beyond Protocol
Commits
19bd3083
Commit
19bd3083
authored
2 years ago
by
Nicolas Pope
Browse files
Options
Downloads
Patches
Plain Diff
Use cppcheck directly
parent
72275623
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.codeclimate.yml
+0
-9
0 additions, 9 deletions
.codeclimate.yml
.gitlab-ci.yml
+7
-40
7 additions, 40 deletions
.gitlab-ci.yml
with
7 additions
and
49 deletions
.codeclimate.yml
deleted
100644 → 0
+
0
−
9
View file @
72275623
plugins
:
cppcheck
:
enabled
:
true
config
:
check
:
all
language
:
c++
stds
:
-
c++14
-
c++17
\ No newline at end of file
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
7
−
40
View file @
19bd3083
...
...
@@ -21,52 +21,19 @@ image: ubuntu:jammy
code_quality
:
stage
:
test
image
:
docker:20.10.12
allow_failure
:
true
services
:
-
name
:
'
docker:20.10.12-dind'
tags
:
-
docker
only
:
-
main
-
merge_requests
variables
:
DOCKER_DRIVER
:
overlay2
DOCKER_TLS_CERTDIR
:
"
"
CODE_QUALITY_IMAGE
:
"
registry.gitlab.com/gitlab-org/ci-cd/codequality:0.85.26"
needs
:
[]
tags
:
-
docker
script
:
-
export SOURCE_CODE=$PWD
-
|
# this is required to avoid undesirable reset of Docker image ENV variables being set on build stage
function propagate_env_vars() {
CURRENT_ENV=$(printenv)
for VAR_NAME; do
echo $CURRENT_ENV | grep "${VAR_NAME}=" > /dev/null && echo "--env $VAR_NAME "
done
}
-
docker pull --quiet "$CODE_QUALITY_IMAGE"
-
|
docker run --rm \
$(propagate_env_vars \
SOURCE_CODE \
TIMEOUT_SECONDS \
CODECLIMATE_DEBUG \
CODECLIMATE_DEV \
REPORT_STDOUT \
REPORT_FORMAT \
ENGINE_MEMORY_LIMIT_BYTES \
CODECLIMATE_PREFIX \
) \
--volume "$PWD":/code \
--volume /var/run/docker.sock:/var/run/docker.sock \
"$CODE_QUALITY_IMAGE" /code
-
DEBIAN_FRONTEND=noninteractive apt update && apt install -y python3 cppcheck
-
python3 -m pip install -U cppcheck_codequality
-
cppcheck --xml --enable=warning,style,performance --std=c++14 --suppress=*:*catch.hpp --suppress=*:*json.hpp ./ 2> cppcheck_out.xml
-
cppcheck-codequality --input-file=cppcheck_out.xml --output-file=cppcheck.json
artifacts
:
reports
:
codequality
:
gl-code-quality-report.json
expire_in
:
1 week
dependencies
:
[]
codequality
:
cppcheck.json
linux:build
:
only
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment