Line Width Checker

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


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.


The python script 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:
This script will output the file name and line number of each line whose width is greater than 80 characters.