codechecker
codechecker copied to clipboard
Cannot run CodeChecker `check` nor `analyze` on CodeChecker container
I am trying to use the official codechecker docker image and followed the documentation to run the server:
docker run -d \
-p 8001:8001 \
-v /home/$USER/codechecker_workspace:/workspace \
codechecker/codechecker-web:latest
I didn't know what to do next so I assumed you have to copy your project to the workspace directory that gets created via the bindmount. I did that and was again confused on how to run the scan. So I got inside the container using docker exec -it <container_name> bash
and tried to run a scan in /workspace/my_project/
with the following command:
CodeChecker analyze compile_commands.json -o my_plist
but that did not work and I was given this output
usage: CodeChecker [-h] {cmd,server,store,version,web-version} ...
CodeChecker: error: invalid choice: 'analyze' (choose from 'cmd', 'server', 'store', 'version', 'web-version')
It looks like I cannot use check
nor analyze
, what can I do? How do I scan a project if I have a codechecker set up via docker?
@ssadeque464 This docker image can only be used only to run a CodeChecker server
. This image doesn't contain the analysis module. There is an open PR to create a docker image for analysis #2888. For now if you want to run analysis see the installation guide how to install CodeChecker: https://github.com/Ericsson/codechecker#install-guide.