You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,12 @@
1
+
# Adding new commands
2
+
For new commands, it is recommended to use clap's [Derive API](https://docs.rs/clap/latest/clap/_derive/index.html).
3
+
In contrast to the [Builder API](https://docs.rs/clap/latest/clap/_tutorial/index.html), the Derive API makes it:
4
+
- Easier to read, write, and modify commands and arguments.
5
+
- Easier to keep argument declaration and reading in sync.
6
+
- Easier to reuse shared arguments.
7
+
8
+
An existing example of how to use the Derive API is the `send-metric` command.
9
+
1
10
# Integration Tests
2
11
3
12
Integration tests are written using `trycmd` crate. Consult the docs in case you need to understand how it works https://docs.rs/trycmd/latest/trycmd/.
0 commit comments