We should integrate a linter into our project.
- Catch obvious bugs through static code analysis (cppcheck)
- Enforce coding conventions such as a maximum nesting depth (article)
- A linter can be configured to ignore legacy code and only check for formatting in the changed lines of a commit
Linters can be run both locally during development and in a pipeline on pull requests. They can create well formatted linting reports which a pipeline can paste into a pull request.
https://megalinter.io/latest/ is a very popular option. It comes with an installer to easily create a pipeline in minutes. Already contains cppcheck
We should integrate a linter into our project.
Linters can be run both locally during development and in a pipeline on pull requests. They can create well formatted linting reports which a pipeline can paste into a pull request.
https://megalinter.io/latest/ is a very popular option. It comes with an installer to easily create a pipeline in minutes. Already contains cppcheck