diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-03-10 12:47:03 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-14 13:04:46 +0200 |
commit | 79a9dc24795e1036063a21230639469c1b8ad655 (patch) | |
tree | e6fff046f9691ddcde89d84ad68593965e27ff9a | |
parent | ddcc3deddd544b65dcfed04b22c678bce3d0f93c (diff) | |
download | UXP-79a9dc24795e1036063a21230639469c1b8ad655.tar UXP-79a9dc24795e1036063a21230639469c1b8ad655.tar.gz UXP-79a9dc24795e1036063a21230639469c1b8ad655.tar.lz UXP-79a9dc24795e1036063a21230639469c1b8ad655.tar.xz UXP-79a9dc24795e1036063a21230639469c1b8ad655.zip |
Minor update to UXP coding style guideline.
-rw-r--r-- | docs/UXP Coding Style.md | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/docs/UXP Coding Style.md b/docs/UXP Coding Style.md index 77a50e0f1..5dc4fd2a5 100644 --- a/docs/UXP Coding Style.md +++ b/docs/UXP Coding Style.md @@ -425,8 +425,9 @@ try { If statements on a single line become overly long, they should be split into multiple lines: - Binary operators (including ternary) must be left on their original lines if the line break happens around the operator. The second line should start in the same column as the start of the expression in the first line. - Lists of variables (e.g. when calling or declaring a function) should be split at the wrapping column. -- Long OOP calls should be split at the period with the period on the start of the new line, indented to the column of the first object, filling to the wrapping column where possible. +- Long OOP calls should be split at the period with the period on the start of the new line, indented to the column of the first object, filling to the wrapping column where possible, including additional terms. - When breaking assignments/operations/logic, break right after the operator (`=`, `+`, `&&`, `||`, etc.) +- **Don't break too rigorously**; short additions should be kept on the same line to keep things legible - use common sense and context for flexibility. WRONG: ```JavaScript @@ -471,5 +472,10 @@ let sessionStartup = Cc["@mozilla.org/browser/sessionstartup;1"] ## XUL and other XML-derivatives Applies to `*.xul`, `*.html`, `*.xhtml`. +TODO ## IDL Applies to `*.idl`, `*.xpidl` and `*.webidl`. +TODO +## Python-esque +Applies to `*.py`, `mozbuild` etc. +TODO |