mirror of
https://github.com/google/styleguide.git
synced 2024-03-22 13:11:43 +08:00
commit
af78b49ac4
|
@ -39,7 +39,7 @@
|
|||
|
||||
This implements title \"Function Declarations and Definitions\"
|
||||
of the Google C++ Style Guide for the case where the previous
|
||||
line ends with an open parenthese.
|
||||
line ends with an open parenthesis.
|
||||
|
||||
\"Current C expression\", as per the Google Style Guide and as
|
||||
clarified by subsequent discussions, means the whole expression
|
||||
|
|
|
@ -3072,7 +3072,7 @@
|
|||
/**
|
||||
* Whether to cancel the event in internal capture/bubble processing.
|
||||
* @public {boolean}
|
||||
* @suppress {visiblity} Referencing this outside this package is strongly
|
||||
* @suppress {visibility} Referencing this outside this package is strongly
|
||||
* discouraged.
|
||||
*/
|
||||
goog.events.Event.prototype.propagationStopped_ = false;
|
||||
|
|
|
@ -92,7 +92,7 @@ characters are used, an explanatory comment can be very helpful.</p>
|
|||
<pre><code class="language-js prettyprint">/* Best: perfectly clear even without a comment. */
|
||||
const units = 'μs';
|
||||
|
||||
/* Allowed: but unncessary as μ is a printable character. */
|
||||
/* Allowed: but unnecessary as μ is a printable character. */
|
||||
const units = '\u03bcs'; // 'μs'
|
||||
|
||||
/* Good: use escapes for non-printable characters with a comment for clarity. */
|
||||
|
|
|
@ -805,8 +805,8 @@ Robert Brown
|
|||
<p>
|
||||
You should strive to keep top-level forms,
|
||||
including comments but excluding the documentation string, of
|
||||
appropriate length; preferrably short. Forms extending beyond a
|
||||
single page should be rare and their use should be justfied.
|
||||
appropriate length; preferably short. Forms extending beyond a
|
||||
single page should be rare and their use should be justified.
|
||||
This applies to each of the forms in an <code>eval-when</code>,
|
||||
rather than to the <code>eval-when</code> itself.
|
||||
Additionally, <code>defpackage</code> forms may be longer,
|
||||
|
@ -3116,7 +3116,7 @@ Robert Brown
|
|||
You must not use exact comparison on floating point numbers,
|
||||
since the vague nature of floating point arithmetic
|
||||
can produce little "errors" in numeric value.
|
||||
You should compare absolute values to a threshhold.
|
||||
You should compare absolute values to a threshold.
|
||||
</p>
|
||||
<p>
|
||||
You must use <code>=</code> to compare numbers,
|
||||
|
|
|
@ -687,7 +687,7 @@ xmlns:fn="http://www.w3.org/2005/xpath-functions">
|
|||
- c: the indentation of the current python block, in other words, the
|
||||
indentation of the first line of this block, which is the
|
||||
indentation of the last line we saw that ended with a colon.
|
||||
- d: the "total" indentation of the line, ignorng possible "Yes:" or
|
||||
- d: the "total" indentation of the line, ignoring possible "Yes:" or
|
||||
"No:" text on the line.
|
||||
|
||||
For example, for the last line of the following code snippet, the
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
<code>>=#</code> must be used for strings.
|
||||
</li>
|
||||
<li>
|
||||
The behavior of <code>=~</code> and friends is dependant upon the
|
||||
The behavior of <code>=~</code> and friends is dependent upon the
|
||||
<code>ignorecase</code> setting.
|
||||
</li>
|
||||
<li>
|
||||
|
@ -232,7 +232,7 @@
|
|||
Loud scripts are annoying.
|
||||
</li>
|
||||
<li>
|
||||
Message the user when an error has occured.
|
||||
Message the user when an error has occurred.
|
||||
</li>
|
||||
<li>
|
||||
Message the user when an operation which takes a long time has
|
||||
|
|
|
@ -110,7 +110,7 @@
|
|||
<STYLEPOINT title="Catching Exceptions">
|
||||
<SUMMARY>Match error codes, not error text.</SUMMARY>
|
||||
<BODY>
|
||||
<p>Error text may be locale dependant.</p>
|
||||
<p>Error text may be locale dependent.</p>
|
||||
</BODY>
|
||||
</STYLEPOINT>
|
||||
</CATEGORY>
|
||||
|
|
Loading…
Reference in New Issue
Block a user