I want to use cpplint for C style checking. How do I do it on an Ubuntu 12.04 LTS 32-bit machine?
1 Answer
Install cpplint
sudo apt-get install python-pip
pip install --user cpplint
Usage
cpplint is an automated checker to make sure a C++ file follows Google's C++ style guide. Following Google's C++ style guide helps to prettify your C++ code and makes it easier to read.
Run cpplint with:
cpplint [OPTIONS] files
For full usage instructions, run:
cpplint --help
Alternatively, you can download ccplint.py from GitHub cpplint: static code checker for C++ webpage and run cpplint without installing it as follows:
python cpplint.py file.cpp