Skip to content

Commit eae3d3c

Browse files
authored
docs: add contributing guide
1 parent 0bbec93 commit eae3d3c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Diff for: CONTRIBUTING.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Contributing
2+
3+
## Add a new command
4+
5+
I recommend opening an issue before creating a PR.
6+
7+
1. You must create a directory with the name of the command.
8+
2. Inside this directory, you must create a `doc.go` with a summary of the git command (based of the help of this command).
9+
3. You must define all the options manually inside [descriptions.json](https://github.com/ldez/go-git-cmd-wrapper/blob/main/internal/descriptions.json).
10+
4. Optionally, you could create a `<command>_custom.go` inside the command directory to add option(s) which cannot be generated.
11+
5. You must run `make generate` to generate the `<command>_gen.go` related to the `descriptions.json`.
12+
6. Inside the command directory, you must add test `<command>_test.go`.
13+
7. You must add examples inside [example_test.go](https://github.com/ldez/go-git-cmd-wrapper/blob/main/git/example_test.go)
14+
15+
Additionally, I use [regular expressions](https://github.com/ldez/go-git-cmd-wrapper/blob/main/internal/readme.adoc) to help with the `descriptions.json`,
16+
but the extracted information from the doc or the help is not useable directly,
17+
manual editions are required.

0 commit comments

Comments
 (0)