Line Width Checker

Home --> Useful Scripts --> Line Width Checker

Problem

I've written source code with embarrassingly wide lines. As a convention, it is good to limit the width of a line to 80 characters.

Script

The python script LineWidthChecker.py.txt checks the line width of all files that end with .h or .cpp in the current working directory. To run the script, remove the .txt extension and enter the following command:
python LineWidthChecker.py
This script will output the file name and line number of each line whose width is greater than 80 characters.