crytic / crytic/slither

Sort print output table items by alphabetical order

Open
#941 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
6.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

## Problem
It is difficult to find the item within the print's feature output table. See below

```
Contract SafeMath
+----------+-----------+
| Function | Modifiers |
+----------+-----------+
| add | [] |
| sub | [] |
| sub | [] |
| mul | [] |
| div | [] |
| div | [] |
| mod | [] |
| mod | [] |
| min | [] |
| sqrt | [] |
+----------+-----------+
```

## Solution

Table items are sorted alphabetically. This would require changes in the code likely [here](https://github.com/crytic/slither/blob/master/slither/printers/summary/modifier_calls.py#L38) as well as on other similar files. Alphabetical order would result in output such as:

```
Contract SafeMath
+----------+-----------+
| Function | Modifiers |
+----------+-----------+
| add | [] |
| div | [] |
| div | [] |
| min | [] |
| mod | [] |
| mod | [] |
| mul | [] |
| sqrt | [] |
| sub | [] |
| sub | [] |
+----------+-----------+
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.