Number: 218
Title: line numbers in warnings?
Submitter: Joachim Nadler
Date: Fri Nov 15 11:03:01 2002
Subsys: Dot
Version: 1.8.10
System: x86-Windows-XP
Severity: cosmetic
Problem:
It is very nice, that dot issues warnings (eg. for meaningless lhead/ltail references). But it might be even more helpful if they were accompanied by a line number.

By the way: it is in general a good thing that dot automatically inserts a node "x" by default if it is referenced in an edge "x -> y" and "x" has not been declared before. But sometimes a typo might be involved so that an unintended edge is created! This case might be difficult to spot in a large graph. The "declare before use" paradigm served a purpose in programming languages, so maybe it is useful in this case too. So I suggest to introduce a command line option that warns if an edge references an (previously?) unseen node. What do you think?
Comments:
Thank you very much in advance. This is really a great tool to work with.

[erg] Line numbers on warnings will involve code change. We could decide to maintain line numbers in the graph, but because nodes and edges can be used multiple times, line numbers would also have to be attached to attributes. Alternatively, moving the check to the parser wouldn't work in general, because the use of ltail or lhead in an edge may precede the definition of the cluster.

As for providing stricter checking, this could be helpful. Other possible checks would be for multiple edge expressions for the same edge, and reporting attributes or values unrecognized by graphviz. This last would probably be most helpful if it checked specifically for attributes close to a known attribute or value, to pick up potential misspellings.
Owner: *
Status: Request