mirror of
https://github.com/google/styleguide.git
synced 2024-03-22 13:11:43 +08:00
Project import generated by Copybara.
PiperOrigin-RevId: 297665437
This commit is contained in:
parent
056962e73a
commit
7c26f834f9
|
@ -758,6 +758,7 @@ removed `./somefile'
|
|||
|
||||
`eval` should be avoided.
|
||||
|
||||
|
||||
Eval munges the input when used for assignment to variables and can
|
||||
set variables without making it possible to check what those variables
|
||||
were.
|
||||
|
@ -1146,15 +1147,13 @@ my_func2() {
|
|||
### Function Location
|
||||
|
||||
Put all functions together in the file just below constants. Don't hide
|
||||
executable code between functions.
|
||||
executable code between functions. Doing so makes the code difficult to follow
|
||||
and results in nasty surprises when debugging.
|
||||
|
||||
If you've got functions, put them all together near the top of the
|
||||
file. Only includes, `set` statements and setting constants
|
||||
may be done before declaring functions.
|
||||
|
||||
Don't hide executable code between functions. Doing so makes the code
|
||||
difficult to follow and results in nasty surprises when debugging.
|
||||
|
||||
<a id="s7.8-main"></a>
|
||||
|
||||
### main
|
||||
|
|
Loading…
Reference in New Issue
Block a user