* If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/apache/apisix/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.
-
## How to add a new feature or change an existing one
_Before making any significant changes, please [open an issue](https://github.com/apache/apisix/issues)._ Discussing your proposed changes ahead of time will make the contribution process smooth for everyone.
* Includes tests for new functionality.
* References the original issue in the description, e.g. "Resolves #123".
* Has a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
+* Ensure your pull request's title starts from one of the word in the `types` section of [semantic.yml](https://github.com/apache/apisix/blob/master/.github/semantic.yml).
+* Follow the [PR manners](https://raw.githubusercontent.com/apache/apisix/master/.github/PULL_REQUEST_TEMPLATE.md)
## Contribution Guidelines for Documentation
* Linting/Style
- Use a markdown linting tool to lint the content. The following is a [plugin](https://github.com/apache/apisix/issues/1273)
- used by our community to lint the docs.
+ For linting both our Markdown and YAML files we use:
+
+ - npm based [markdownlint-cli](https://www.npmjs.com/package/markdownlint-cli)
+
+ For linting all files' license header we use:
+
+ - [license-eye](https://github.com/apache/skywalking-eyes)
+
+ For linting our shell files we use:
+
+ - [shellcheck](https://github.com/koalaman/shellcheck)
+
+ For linting our zh document files we use:
+
+ - [autocorrect](https://github.com/huacnlee/autocorrect)
* Active Voice
* code style
* Please take a look at [APISIX Lua Coding Style Guide](CODE_STYLE.md).
* Use tool to check your code statically by command: `make lint`.
+
```shell
# install `luacheck` first before run it
$ luarocks install luacheck
# check source code
$ make lint
- luacheck -q lua
- Total: 0 warnings / 0 errors in 74 files
- ./utils/lj-releng \
- apisix/*.lua \
- apisix/admin/*.lua \
- apisix/core/*.lua \
- apisix/http/*.lua \
- apisix/http/router/*.lua \
- apisix/plugins/*.lua \
- apisix/plugins/grpc-transcode/*.lua \
- apisix/plugins/limit-count/*.lua > \
- /tmp/check.log 2>&1 || (cat /tmp/check.log && exit 1)
+ ./utils/check-lua-code-style.sh
+ + luacheck -q apisix t/lib
+ Total: 0 warnings / 0 errors in 146 files
+ + find apisix -name *.lua ! -wholename apisix/cli/ngx_tpl.lua -exec ./utils/lj-releng {} +
+ + grep -E ERROR.*.lua: /tmp/check.log
+ + true
+ + [ -s /tmp/error.log ]
+ ./utils/check-test-code-style.sh
+ + find t -name '*.t' -exec grep -E '\-\-\-\s+(SKIP|ONLY|LAST|FIRST)$' '{}' +
+ + true
+ + '[' -s /tmp/error.log ']'
+ + find t -name '*.t' -exec ./utils/reindex '{}' +
+ + grep done. /tmp/check.log
+ + true
+ + '[' -s /tmp/error.log ']'
```
+
+ The `lj-releng` and `reindex` will be downloaded automatically by `make lint` if not exists.
+
* test case style
- * Use tool to check your test case style statically by command, eg: `reindex t/admin/*.t`.
-```shell
- # install `reindex` first before run it
- # wget https://raw.githubusercontent.com/iresty/openresty-devel-utils/master/reindex
- # ./reindex test cases
- $ reindex t/admin/*.t
- reindex: t/plugin/example.t: skipped. # No changes needed
- reindex: t/plugin/fault-injection.t: done. # updated
- reindex: t/plugin/grpc-transcode.t: skipped.
- ... ...
- reindex: t/plugin/udp-logger.t: done.
- reindex: t/plugin/zipkin.t: skipped.
-```
- * By the way, we can download "reindex" to another path and add this path to "PATH" environment.
+ * Use tool to check your test case style statically by command, eg: `make lint`.
+ * When the test file is too large, for example > 800 lines, you should split it to a new file.
+ Please take a look at `t/plugin/limit-conn.t` and `t/plugin/limit-conn2.t`.
+ * For more details, see the [testing framework](https://github.com/apache/apisix/blob/master/docs/en/latest/internal/testing-framework.md)
+
+## Contributor T-shirt
+
+If you have contributed to Apache APISIX, no matter it is a code contribution to fix a bug or a feature request, or a documentation change, Congratulations! You are eligible to receive the very special Contributor T-shirt! It's always been the community effort that has made Apache APISIX be understood and used by more developers. Go ahead and fill out the [Contributors Submissions form](https://docs.google.com/forms/d/e/1FAIpQLSdXEpCs60UK49UlOGdBCQSXr7DYz3enyT4GJPKrYQmYfVLPKQ/viewform).
+
+
## Do you have questions about the source code?
-- **QQ Group**: 578997126(recommended), 552030619
+- **QQ Group**: 781365357(recommended), 578997126, 552030619
- Join in `apisix` channel at [Apache Slack](http://s.apache.org/slack-invite). If the link is not working, find the latest one at [Apache INFRA WIKI](https://cwiki.apache.org/confluence/display/INFRA/Slack+Guest+Invites).