Home Assignments Lecture Blog Resources Discussion Group

Refactor and cpplint

This assignment is an opportunity to make up lost points on a prior assignment, and to gain experience using Google's cpplint code style tool.

The assignment

  • Pick any prior assignment
  • Get all code files to pass the tests done by cpplint
  • Package them up and submit


Google's style guide is here:

The file can be retrieved from

Save the file on your machine, and then:

chmod +x
sudo mv /usr/local/bin

Now, you can style-check a file using as an executable: filename

Alternately, you could run it using Python:

python filename

Using cpplint

We've agreed to turn off certain warnings. At present, you may run with: --filter=-runtime/references,-build/header_guard --extensions=cpp,hpp

Package your work

  1. Put your files in the subdirectory called psx.
  2. Create a file called psx-readme.txt. The first line of this file must contain the name of the assignment, by itself, e.g. ps1 or ps3b. In the rest of the file, explain which changes you made to the original homework.
  3. Use the tar command from the parent directory of your psx to compress your directory structure:
tar czvf <archive-file-name>.tar.gz psx

Submit your work

Submit via Bottlenose as follows:
Martin section (201):
Grinberg section (202):