Skip to content

Commit e3a1826

Browse files
committed
Move "How to Contribute" into CONTRIBUTING.md
1 parent 56b4ec4 commit e3a1826

File tree

3 files changed

+41
-31
lines changed

3 files changed

+41
-31
lines changed

CONTRIBUTING.md

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# How to Contribute
2+
3+
## English
4+
5+
### Guideline (en)
6+
7+
All contributions to PHP Mode are welcome. But please try to do the following when sending improvements or bug fixes:
8+
9+
1. Add your name to the list of ‘Contributors’ in this `README.md` file if it is not there already. If you have a GitHub page and/or personal site then please feel free to link your name to it so people can see your other work.
10+
2. If your contribution addresses an issue on the GitHub project page then include a single line like `GitHub-Issue: #16` with the appropriate issue number.
11+
3. Make sure to update the constant `php-mode-modified` *only if you patch affects `php-mode.el`,* which means this step is unnecessary for patches related to unit tests.
12+
4. However, please do not modify `php-mode-version-number`. The maintainers will decide what constitutes a bump in the version number.
13+
5. Open the `php-mode-test.el` file and [run all of the tests] to ensure they still pass as expected. Sometimes we expect for a test to fail, and those unit tests have the appropriate configuration so their failure will not raise any warnings. You can use `make test` script to run all tests from a terminal, which is also useful in conjunction with [`git bisect run`].
14+
6. Send us a pull request here on GitHub.
15+
7. Please make your commit messages as detailed as possible. It is better to be too verbose than to write too little. Look at the commits of the maintainers to see many examples of the level of detail that we feel is ideal. Please never assume that your patch is so simple that future developers will be able to understand the *reason* for the change without comment. And that is important: your commit message should always strive to answer *"Why"* the patch exists, *"What*" does it accomplish? The maintainers will sometimes write detailed commit messages for pull-requests by other developers, but please do not rely on us to do this consistently.
16+
17+
If you are fixing a bug related to a GitHub issue, then first of all, thank you for the help improving PHP Mode. Second, there is a `tests/` directory which contains PHP scripts for issues (although not all of them). Please consider adding a test script to that directory that documents the expected behavior and provides code that allows others to see if said behavior works properly. Then create a unit test within `php-mode-test.el` using [ERT]. Please try to follow the format of the existing tests.
18+
19+
----------
20+
21+
## Japanese
22+
23+
### Guideline (ja)
24+
25+
PHPモードはどなたからの貢献も歓迎です。改善やバグ修正を行う前に以下の手順を行ってください。
26+
27+
1. あなたの名前が`README.md`の“Contributors”のリストになければ追加してください。あなたの名前とGitHubアカウントや個人サイトをリンクして構いません。
28+
2. もし既にissueとして提起された問題に対処するならば、コミットメッセージに`GitHub-Issue: #16`のような行を含めてください。
29+
3. `php-mode.el`に影響する変更をした場合、`php-mode-modified`定数を更新してください。テストやドキュメントのみの修正の場合は不要です。
30+
4. しかし、 `php-mode-version-number` は変更しないでください。メンテナがバージョンを決定します。
31+
5. `php-mode-test.el`を開いて[すべてのテストを実行][run all of the tests]し、期待通りにテストを通過することを確認します。端末から`make test`で確認することもでき、[`git bisect run`]と併用すると便利です。
32+
6. GitHubからプルリクエストを送信します
33+
7. 可能な限り詳細なコミットメッセージを作成してください。不足するよりも冗長すぎる方が良いです。メンテナーのコミットを参照して、私たちが理想的だと期待するコミットメッセージの詳細度として参考にしてください。シンプルすぎるパッチだからと決めつけずにコミットメッセージを書けば、コード中にコメントを書かなくても将来の開発者がコミットの「理由」「経緯」を理解できるようになります。コミットメッセージには「なぜ」コミットを作成したか、「何を」解決するものなのかを記述することが重要です。メンテナーはほかの開発者のプルリクエストに詳細なコミットメッセージを書き込むことがありますが、常に一貫して行われるとは期待しないでください。
34+
35+
**GitHubのissueに関連するバグを修正する場合**: PHPモードの改善に協力いただきありがとうございます! `tests/`ディレクトリには(すべてではありませんが)issueに関連のあるPHPスクリプトが配置されています。そこに予期される挙動と他のひとが動作を適切に確認できるテストコードを追加することを検討してください。そして`php-mode-test.el`に既存のテストと同じように[ERT]を使ったテストコードを追加してください。
36+
37+
[run all of the tests]: http://www.gnu.org/software/emacs/manual/html_node/ert/Running-Tests-Interactively.html#Running-Tests-Interactively
38+
[`git bisect run`]: http://git-scm.com/book/en/Git-Tools-Debugging-with-Git
39+
[ERT]: http://www.gnu.org/software/emacs/manual/html_node/ert/index.html

README.ja.md

+1-12
Original file line numberDiff line numberDiff line change
@@ -299,17 +299,7 @@ PHPプログラミングのためのパッケージ
299299
貢献するには
300300
-----------------
301301

302-
PHPモードはどなたからの貢献も歓迎です。改善やバグ修正を行う前に以下の手順を行ってください。
303-
304-
1. あなたの名前が`README.md`の“Contributors”のリストになければ追加してください。あなたの名前とGitHubアカウントや個人サイトをリンクして構いません。
305-
2. もし既にissueとして提起された問題に対処するならば、コミットメッセージに`GitHub-Issue: #16`のような行を含めてください。
306-
3. `php-mode.el`に影響する変更をした場合、`php-mode-modified`定数を更新してください。テストやドキュメントのみの修正の場合は不要です。
307-
4. しかし、 `php-mode-version-number` は変更しないでください。メンテナがバージョンを決定します。
308-
5. `php-mode-test.el`を開いて[すべてのテストを実行](http://www.gnu.org/software/emacs/manual/html_node/ert/Running-Tests-Interactively.html#Running-Tests-Interactively)し、期待通りにテストを通過することを確認します。端末から`make test`で確認することもでき、[`git bisect run`](http://git-scm.com/book/en/Git-Tools-Debugging-with-Git)と併用すると便利です。
309-
6. GitHubからプルリクエストを送信します
310-
7. 可能な限り詳細なコミットメッセージを作成してください。不足するよりも冗長すぎる方が良いです。メンテナーのコミットを参照して、私たちが理想的だと期待するコミットメッセージの詳細度として参考にしてください。シンプルすぎるパッチだからと決めつけずにコミットメッセージを書けば、コード中にコメントを書かなくても将来の開発者がコミットの「理由」「経緯」を理解できるようになります。コミットメッセージには「なぜ」コミットを作成したか、「何を」解決するものなのかを記述することが重要です。メンテナーはほかの開発者のプルリクエストに詳細なコミットメッセージを書き込むことがありますが、常に一貫して行われるとは期待しないでください。
311-
312-
**GitHubのissueに関連するバグを修正する場合**: PHPモードの改善に協力いただきありがとうございます! `tests/`ディレクトリには(すべてではありませんが)issueに関連のあるPHPスクリプトが配置されています。そこに予期される挙動と他のひとが動作を適切に確認できるテストコードを追加することを検討してください。そして`php-mode-test.el`に既存のテストと同じように[ERT][]を使ったテストコードを追加してください。
302+
[CONTRIBUTING.md](CONTRIBUTING.md#japanese)をご覧ください。
313303

314304
Wiki
315305
--------
@@ -339,7 +329,6 @@ Contributors
339329
PHPモードの改善に協力したすべての貢献者のリストは[README.md#contributors](https://github.com/emacs-php/php-mode/blob/master/README.md#contributors)に掲載されています。
340330

341331
[wiki]: https://github.com/emacs-php/php-mode/wiki
342-
[ert]: http://www.gnu.org/software/emacs/manual/html_node/ert/index.html
343332
[cc mode]: https://www.gnu.org/software/emacs/manual/html_mono/ccmode.html
344333
[Subword Mode]: https://www.gnu.org/software/emacs/manual/html_node/ccmode/Subword-Movement.html
345334
[camelCase]: https://ja.wikipedia.org/wiki/%E3%82%AD%E3%83%A3%E3%83%A1%E3%83%AB%E3%82%B1%E3%83%BC%E3%82%B9

README.md

+1-19
Original file line numberDiff line numberDiff line change
@@ -275,24 +275,7 @@ Other Packages for PHP programming
275275
How to Contribute
276276
-----------------
277277

278-
All contributions to PHP Mode are welcome. But please try to do the following when sending improvements or bug fixes:
279-
280-
1. Add your name to the list of ‘Contributors’ in this `README.md` file if it is not there already. If you have a GitHub page and/or personal site then please feel free to link your name to it so people can see your other work.
281-
282-
2. If your contribution addresses an issue on the GitHub project page then include a single line like `GitHub-Issue: #16` with the appropriate issue number.
283-
284-
3. Make sure to update the constant `php-mode-modified` *only if you patch affects `php-mode.el`,* which means this step is unnecessary for patches related to unit tests.
285-
286-
4. However, please do not modify `php-mode-version-number`. The maintainers will decide what constitutes a bump in the version number.
287-
288-
5. Open the `php-mode-test.el` file and [run all of the tests](http://www.gnu.org/software/emacs/manual/html_node/ert/Running-Tests-Interactively.html#Running-Tests-Interactively) to ensure they still pass as expected. Sometimes we expect for a test to fail, and those unit tests have the appropriate configuration so their failure will not raise any warnings. You can use `make test` script to run all tests from a terminal, which is also useful in conjunction with [`git bisect run`](http://git-scm.com/book/en/Git-Tools-Debugging-with-Git).
289-
290-
6. Send us a pull request here on GitHub.
291-
292-
7. Please make your commit messages as detailed as possible. It is better to be too verbose than to write too little. Look at the commits of the maintainers to see many examples of the level of detail that we feel is ideal. Please never assume that your patch is so simple that future developers will be able to understand the *reason* for the change without comment. And that is important: your commit message should always strive to answer *"Why"* the patch exists, *"What*" does it accomplish? The maintainers will sometimes write detailed commit messages for pull-requests by other developers, but please do not rely on us to do this consistently.
293-
294-
If you are fixing a bug related to a GitHub issue, then first of all, thank you for the help improving PHP Mode. Second, there is a `tests/` directory which contains PHP scripts for issues (although not all of them). Please consider adding a test script to that directory that documents the expected behavior and provides code that allows others to see if said behavior works properly. Then create a unit test within `php-mode-test.el` using [ERT][]. Please try to follow the format of the existing tests.
295-
278+
Please see [CONTRIBUTING.md](CONTRIBUTING.md#english).
296279

297280
The Wiki
298281
--------
@@ -403,7 +386,6 @@ In chronological order:
403386

404387

405388
[wiki]: https://github.com/emacs-php/php-mode/wiki
406-
[ert]: http://www.gnu.org/software/emacs/manual/html_node/ert/index.html
407389
[cc mode]: https://www.gnu.org/software/emacs/manual/html_mono/ccmode.html
408390
[Subword Mode]: https://www.gnu.org/software/emacs/manual/html_node/ccmode/Subword-Movement.html
409391
[camelCase]: http://en.wikipedia.org/wiki/Camel_case

0 commit comments

Comments
 (0)