差分
このページの2つのバージョン間の差分を表示します。
| dokuwiki:ja:development [2006/11/13] – 作成 admin | dokuwiki:ja:development [2006/11/13] (現在) – 外部編集 (不明な日付) 127.0.0.1 | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| + | ====== コード修正 ====== | ||
| + | |||
| + | もしDokuWikiに協力し、開発に参加したいなら、このページを読んでください。 | ||
| + | |||
| + | コードを理解し、開発を始めるポイントを含む、[[wiki: | ||
| + | |||
| + | ===== 開発コードの取得 ===== | ||
| + | |||
| + | 現行の開発コードは、[[Darcs]]レポジトリ(倉庫)または[[http:// | ||
| + | |||
| + | ===== コミュニケーション ===== | ||
| + | |||
| + | All development activity is coordinated through the [[mailinglist]] ([[http:// | ||
| + | |||
| + | ===== What to do ===== | ||
| + | |||
| + | Well what you want to contribute is of course up to you -- you should scratch your own itches first. If you need some ideas of what is missing from DokuWiki you should have a look at the [[bugs|bugtracker]]. | ||
| + | |||
| + | Please also have a look at [[wiki: | ||
| + | |||
| + | ===== Coding Style ===== | ||
| + | |||
| + | I'm not very strict in how the code should be formatted but a few basic things should be attend when adding code to DokuWiki. | ||
| + | |||
| + | ==== Brackets and Indentations ==== | ||
| + | |||
| + | You should indent your code by either 2 or 4 **spaces** to mark logical blocks. Please **do not use tabs**. The same number of spaces should be used through the whole file, so check how many spaces the existing code uses and use the same amount. | ||
| + | |||
| + | Opening brackets should start on the same line as the keyword, closing bracket should be aligned below the first letter of the starting keyword. Eg: | ||
| + | |||
| + | <code php> | ||
| + | if ($foo == " | ||
| + | call_bar(); | ||
| + | }elseif($foo == " | ||
| + | call_baz(); | ||
| + | }else{ | ||
| + | call_other(); | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ==== Lineendings ==== | ||
| + | |||
| + | Lines should end with a single linefeed character (UNIX style). Please try to avoid trailing whitespace. Have a look at my [[:.vimrc]] file on how to spot it easily in VIM. | ||
| + | |||
| + | ==== Commenting ==== | ||
| + | |||
| + | Each function and class should have a PHPDocumentor style comment, giving at least the function' | ||
| + | |||
| + | Example: | ||
| + | |||
| + | <code php> | ||
| + | /** | ||
| + | * Check for foo in bar | ||
| + | * | ||
| + | * Checks if there is a foo in bar | ||
| + | * | ||
| + | * @author | ||
| + | * @param | ||
| + | * @returns | ||
| + | */ | ||
| + | function is_foo($in){ | ||
| + | ... | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | These comments are used for the [[http:// | ||
| + | |||
| + | ==== PHP closing tags ==== | ||
| + | |||
| + | You should omit PHP's closing tags (''?>'' | ||
| + | |||
| + | > **Note:** The closing tag of a PHP block at the end of a file is optional, and in some cases omitting it is helpful when using include() | ||
| + | |||
| + | ==== Unit Tests ==== | ||
| + | |||
| + | All new code additions should be accompanied by appropriate test cases as described in [[wiki: | ||
| + | |||
| + | ===== Sending Patches ===== | ||
| + | |||
| + | Patches should be send to the [[mailinglist]] or to < | ||
| + | |||
| + | ===== Development Docs ===== | ||
| + | |||
| + | Here is a list of documents which should help you to understand some of [[DokuWikis]] internals. | ||
| + | |||
| + | * [[wiki: | ||
| + | * [[Parser]] -- Overview on the parser and render system. | ||
| + | * [[wiki: | ||
| + | * [[wiki: | ||