The CLI has grown to a big variety of options. clap prints them in the help message (--help) in the order they were defined. We now are at a point where grouping things logically together doesn't work well. Further, there is no support by clap for logical grouping and the current code base wasn't consistent. Therefore, this commit introduces two changes: - a new structure to define arguments (all in an array) - an alphabetical ordering of the arguments No other changes have been made. No options have been altered. This significantly improves: - code maintainability and extensibility - readability of the --help output A unit test ensures they stay sorted. A better approach to check if the list of arguments (known at build time) is sorted would be a compile time check (`const`), but this currently isn't possible in stable Rust. Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com |
||
|---|---|---|
| .. | ||
| bin | ||
| main.rs | ||