Code style check container.
The guide will help you to check your code's coding style and find issues with the code that generally compiler does not show.
-
Download ready made docker-containers for the module - https://gitlab.iotiot.in/newbies/pre-office-office/docker-containers/-/archive/master/docker-containers-master.zip
-
Open Up VScode.
-
Press
Ctrl
+Shift
+p
in VScode. A bar will open up at the top. -
Click on "Remote-Containers: Open Folder in Containers".
-
In the pop up Window, Navigate to Downloads --> docker-containers-master --> code-style-container.
-
Vscode will take some time to start up the container, once done the window will look like this below
-
Clone the project repository
sh git clone {your-project-repo} cd {your-project-name}
For example: Lets say your project repository ishttps://gitlab.iotiot.in/newbies/pre-office-office/devops-trial.git
then the steps aresh git clone https://gitlab.iotiot.in/newbies/pre-office-office/devops-trial.git cd devops-trial
-
Check for vulnerabilities using flawfinder, run command
sh flawfinder {folder-which-contains-your-code}
-
Check for MISRA C/CPP violations, run commands
sh cppcheck cppcheck --dump --quiet {folder-which-contains-your-code}/* python3 /usr/share/cppcheck/addons/misra.py {folder-which-contains-your-code}/*.dump