Patchwork [1,of,6] check-code: export needs a space so avoid false possitives

login
register
mail settings
Submitter timeless@mozdev.org
Date Jan. 12, 2016, 6:38 p.m.
Message ID <13f44adf400886e8d65f.1452623884@waste.org>
Download mbox | patch
Permalink /patch/12697/
State Accepted
Delegated to: Yuya Nishihara
Headers show

Comments

timeless@mozdev.org - Jan. 12, 2016, 6:38 p.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1452614339 0
#      Tue Jan 12 15:58:59 2016 +0000
# Node ID 13f44adf400886e8d65fcb2bcf5dc5763b250214
# Parent  edd2615ad226c14f6904fc1738c3dc36431db223
check-code: export needs a space so avoid false possitives
Yuya Nishihara - Jan. 15, 2016, 2:37 p.m.
On Tue, 12 Jan 2016 12:38:04 -0600, timeless wrote:
> # HG changeset patch
> # User timeless <timeless@mozdev.org>
> # Date 1452614339 0
> #      Tue Jan 12 15:58:59 2016 +0000
> # Node ID 13f44adf400886e8d65fcb2bcf5dc5763b250214
> # Parent  edd2615ad226c14f6904fc1738c3dc36431db223
> check-code: export needs a space so avoid false possitives
> 
> diff --git a/contrib/check-code.py b/contrib/check-code.py
> --- a/contrib/check-code.py
> +++ b/contrib/check-code.py
> @@ -107,7 +107,7 @@
>       "use egrep for extended grep syntax"),
>      (r'/bin/', "don't use explicit paths for tools"),
>      (r'[^\n]\Z', "no trailing newline"),
> -    (r'export.*=', "don't export and assign at once"),
> +    (r'export .*=', "don't export and assign at once"),

Sure, pushed this one to the clowncopter, thanks.

Patch

diff --git a/contrib/check-code.py b/contrib/check-code.py
--- a/contrib/check-code.py
+++ b/contrib/check-code.py
@@ -107,7 +107,7 @@ 
      "use egrep for extended grep syntax"),
     (r'/bin/', "don't use explicit paths for tools"),
     (r'[^\n]\Z', "no trailing newline"),
-    (r'export.*=', "don't export and assign at once"),
+    (r'export .*=', "don't export and assign at once"),
     (r'^source\b', "don't use 'source', use '.'"),
     (r'touch -d', "don't use 'touch -d', use 'touch -t' instead"),
     (r'ls +[^|\n-]+ +-', "options to 'ls' must come before filenames"),