Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boxes + horizontal flow makes for more readable call graphs #2603

Merged
merged 2 commits into from
Dec 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion slither/printers/call/call_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@
}
content = "\n".join(
["strict digraph {"]
+ ["rankdir=\"LR\""]
+ ["node [shape=box]"]
+ [_process_functions(list(all_functions_as_dict.values()))]
+ ["}"]
)
Expand All @@ -268,7 +270,11 @@
with open(derived_output_filename, "w", encoding="utf8") as f:
info += f"Call Graph: {derived_output_filename}\n"
content = "\n".join(
["strict digraph {"] + [_process_functions(derived_contract.functions)] + ["}"]
["strict digraph {"]

Check warning on line 273 in slither/printers/call/call_graph.py

View workflow job for this annotation

GitHub Actions / Lint Code Base

C0303: Trailing whitespace (trailing-whitespace)
+ ["rankdir=\"LR\""]
+ ["node [shape=box]"]
+ [_process_functions(derived_contract.functions)]

Check warning on line 276 in slither/printers/call/call_graph.py

View workflow job for this annotation

GitHub Actions / Lint Code Base

C0303: Trailing whitespace (trailing-whitespace)
+ ["}"]
)
f.write(content)
results.append((derived_output_filename, content))
Expand Down
Loading