should we just check that LINE_COUNTS is defined or should we check if we are in a git repo or should we make sure that the line counts file is not obsolete. 

The problem is that a developer on a git repo can run the line generations script once and have the line counts file generated while he continues to change the js files making the line counts file as obsolete. To solve this problem I have a method in error_report.lib.php that checks for line count obsolescence.