[v3,07/11] Remove confusing example

Submitted by Christophe de Dinechin on Feb. 8, 2018, 11:25 a.m.

Details

Message ID 20180208112531.19601-8-christophe@dinechin.org
State New
Headers show
Series "Updates to the style guide" ( rev: 2 1 ) in Spice

Not browsing as part of any series.

Commit Message

Christophe de Dinechin Feb. 8, 2018, 11:25 a.m.
From: Christophe de Dinechin <dinechin@redhat.com>

The sentence explaining that example makes no real sense, and
the coding style suggestion is horrendous (not to mention flies in the
face of all automatic indentation tools)

Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
---
 docs/spice_style.txt | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

Patch hide | download patch | download mbox

diff --git a/docs/spice_style.txt b/docs/spice_style.txt
index 486efbc9..68dbeeef 100644
--- a/docs/spice_style.txt
+++ b/docs/spice_style.txt
@@ -279,15 +279,7 @@  if (condition) {
 +
 In case of long condition statement, prefer having additional temporary variable over multiple line condition statement.
 +
-In case of new line in condition statement.
-+
-[source,c]
-----
-if (long_name && very_long_name && very_long ||
-                                               var_name) {
-----
-+
-or indent under the round bracket using spaces
+Indent long conditionals under the opening parenthesis using spaces
 +
 [source,c]
 ----

Comments

See https://lists.freedesktop.org/archives/spice-devel/2018-February/041727.html

> From: Christophe de Dinechin <dinechin@redhat.com>
> 
> The sentence explaining that example makes no real sense, and
> the coding style suggestion is horrendous (not to mention flies in the
> face of all automatic indentation tools)
> 
> Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
> ---
>  docs/spice_style.txt | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/docs/spice_style.txt b/docs/spice_style.txt
> index 486efbc9..68dbeeef 100644
> --- a/docs/spice_style.txt
> +++ b/docs/spice_style.txt
> @@ -279,15 +279,7 @@ if (condition) {
>  +
>  In case of long condition statement, prefer having additional temporary
>  variable over multiple line condition statement.
>  +
> -In case of new line in condition statement.
> -+
> -[source,c]
> -----
> -if (long_name && very_long_name && very_long ||
> -                                               var_name) {
> -----
> -+
> -or indent under the round bracket using spaces
> +Indent long conditionals under the opening parenthesis using spaces
>  +
>  [source,c]
>  ----