pydoctor icon indicating copy to clipboard operation
pydoctor copied to clipboard

Syntax error reports don't contain information about the error

Open RunDevelopment opened this issue 7 months ago • 2 comments

Currently, syntax errors in doc strings are reported like this:

Generating objects inventory at docs/objects.inv
these 2 objects' docstrings contain syntax errors:
    spandrel.architectures.GRL.__arch.grl.GRL
    spandrel.architectures.GRL.__arch.grl.TransformerStage

This is not enough information. It says where an error happened, but not what the error is.

In my case, I have 100 lines in a single doc comment and no idea what the problem is. The page renders correctly, it's just objects.inv that's causing my CI to fail. I'm using the google docformat, but the same problem occurs with restructured text as well.

Please show the error message and ideally the line and column of the syntax error as well.

I would like the above report to look like something like this:

Generating objects inventory at docs/objects.inv
these 2 objects' docstrings contain syntax errors:
    spandrel.architectures.GRL.__arch.grl.GRL
        L16:4  Invalid character '*' or whatever, idk the actual error
    spandrel.architectures.GRL.__arch.grl.TransformerStage
        L94  Unexpected list in the middle of whatever

Running pydoctor -v does not give additional information about the above errors.

RunDevelopment avatar Jul 08 '24 20:07 RunDevelopment