threeapples307 / closure-linter

Automatically exported from code.google.com/p/closure-linter
Apache License 2.0
0 stars 0 forks source link

Linter should display the file being processed when an error occurrs. #68

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I have found linter (both fixjsstyle ang gjslint) sometimes crashing with very 
obscure errors like:

AttributeError: 'NoneType' object has no attribute 'string

Now, I don't mind obscure errors, I have the linter source so I can kind of 
infer what they mean, but it would help so much if you just printed a message 
such as:

An unexpected error occurred whilst processing file ....../x/x/x.js:
... Stack Trace...
AttributeError: 'NoneType' object has no attribute 'string

As most of the time the cause of these obscure errors is clear if you just look 
at the file.

I do this by just using a stdout.print in fixjsstyle.py however, not being 
familiar enough with the linter source I would rather not submit my hack as a 
patch as I'm sure a more appropriate location exists to do this debugging.

Guido

Original issue reported on code.google.com by guido.tapia@gmail.com on 20 May 2013 at 10:21

GoogleCodeExporter commented 9 years ago
I've attached my code anyways.

PS: My CLA is under my company name 'PicNet Pty Ltd'.

Original comment by guido.tapia@gmail.com on 20 May 2013 at 10:38

Attachments: