summaryrefslogtreecommitdiff
path: root/CONTRIBUTING.md
diff options
context:
space:
mode:
authorAzat Khuzhin <a3at.mail@gmail.com>2016-02-15 23:43:10 +0300
committerAzat Khuzhin <a3at.mail@gmail.com>2016-10-05 15:51:40 +0300
commita22d2033861284c0f25096b00bed8552a1ce2ed4 (patch)
tree315be918f41fb7bd446770a62777333cfc72a290 /CONTRIBUTING.md
parentd482486a154dc8cd6952cd45b22d805868c8af01 (diff)
downloadlibevent-a22d2033861284c0f25096b00bed8552a1ce2ed4.tar.gz
Add CONTRIBUTING.md (with checkpatch.sh examples)
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r--CONTRIBUTING.md35
1 files changed, 35 insertions, 0 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 00000000..38756939
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,35 @@
+# Contributing to the libevent
+
+## Coding style
+
+First and most generic rule: **just look around**.
+
+But, we have a script for checking patches/files/git-refs:
+```shell
+# Chech HEAD git ref
+./checkpatch.sh -r
+./checkpatch.sh -r HEAD
+
+# Check patch
+git format-patch --stdout -1 | ./checkpatch.sh -p
+git show -1 | ./checkpatch.sh -p
+
+# Or via regular files
+git format-patch --stdout -2
+./checkpatch.sh *.patch
+
+# Over a file
+./checkpatch.sh -d event.c
+./checkpatch.sh -d < event.c
+
+# And print the whole file not only summary
+./checkpatch.sh -f event.c
+./checkpatch.sh -f < event.c
+
+# See
+./checkpatch.sh -h
+```
+
+## Testing
+- Write new unit test in `test/regress_{MORE_SUITABLE_FOR_YOU}.c`
+- `make verify`