Open cabiad opened 5 years ago
what about modifying the Stats methods to gather node information as well, mainly file/lineno for simple debugging.
@visit(nodes.FunctionDef)
def count_bad_functions(node, stats, _):
if node.name.startswith('deprecated'):
stats.increment('deprecated_funcs', node)
and then stats would record basic node info so the final result output contains references explaining how the stats were reached.
just printing the various dicts isn't exactly user-friendly ;)