Message ID | 20190903211341.10341-1-jerzy.m.grzegorek@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | Improve alphabetical order checking of Config.in files | expand |
Hello Ricardo, Do you think you could review this patch series that touches checkpackagelib ? It would be very useful to have your feedback. Thanks a lot! Thomas On Tue, 3 Sep 2019 23:13:24 +0200 Jerzy Grzegorek <jerzy.m.grzegorek@gmail.com> wrote: > Rename variable 'm' for better readability. > > Signed-off-by: Jerzy Grzegorek <jerzy.m.grzegorek@gmail.com> > Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> > --- > utils/checkpackagelib/lib_config.py | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/utils/checkpackagelib/lib_config.py b/utils/checkpackagelib/lib_config.py > index 225f92af13..a3fbd0e69e 100644 > --- a/utils/checkpackagelib/lib_config.py > +++ b/utils/checkpackagelib/lib_config.py > @@ -77,7 +77,8 @@ class CommentsMenusPackagesOrder(_CheckFunction): > "package/Config.in.host"]: > return > > - m = re.match(r'^\s*source ".*/([^/]*)/Config.in(.host)?"', text) > + source_line = re.match(r'^\s*source ".*/([^/]*)/Config.in(.host)?"', text) > + > if text.startswith("comment ") or text.startswith("if ") or \ > text.startswith("menu "): > > @@ -113,9 +114,9 @@ class CommentsMenusPackagesOrder(_CheckFunction): > elif text.startswith("endmenu"): > self.state = self.state[:-5] > > - elif m: > + elif source_line: > level = self.get_level() > - new_package = m.group(1) > + new_package = source_line.group(1) > > # We order _ before A, so replace it with . > new_package_ord = new_package.replace('_', '.')
Hello, On Mon, Sep 23, 2019 at 06:17 PM, Thomas Petazzoni wrote: > Do you think you could review this patch series that touches > checkpackagelib ? It would be very useful to have your feedback. Sure. I will review all patches. Probably only few patches each day. Regards, Ricardo
Hello, On Tue, Sep 03, 2019 at 06:13 PM, Jerzy Grzegorek wrote: > checkpackagelib/lib_config.py: CommentsMenusPackagesOrder: rename variable 'm' I guess a better prefix would be: utils/checkpackagelib: CommentsMenusPackagesOrder: rename variable 'm' Since it is a minor nit, I give my tag below and the maintainer who applies this patch can decide to change or not. > > Rename variable 'm' for better readability. > > Signed-off-by: Jerzy Grzegorek <jerzy.m.grzegorek@gmail.com> > Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Reviewed-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Regards, Ricardo
Hello, On Tue, 3 Sep 2019 23:13:24 +0200 Jerzy Grzegorek <jerzy.m.grzegorek@gmail.com> wrote: > Rename variable 'm' for better readability. > > Signed-off-by: Jerzy Grzegorek <jerzy.m.grzegorek@gmail.com> > Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> > --- > utils/checkpackagelib/lib_config.py | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) I have applied patches 1 to 5 (included), with Ricardo Acked-by, after fixing PATCH 02/18 to initialize self.level, and also taking into account the other comments made by Ricardo on the commit titles and commit logs. Thanks! Thomas
diff --git a/utils/checkpackagelib/lib_config.py b/utils/checkpackagelib/lib_config.py index 225f92af13..a3fbd0e69e 100644 --- a/utils/checkpackagelib/lib_config.py +++ b/utils/checkpackagelib/lib_config.py @@ -77,7 +77,8 @@ class CommentsMenusPackagesOrder(_CheckFunction): "package/Config.in.host"]: return - m = re.match(r'^\s*source ".*/([^/]*)/Config.in(.host)?"', text) + source_line = re.match(r'^\s*source ".*/([^/]*)/Config.in(.host)?"', text) + if text.startswith("comment ") or text.startswith("if ") or \ text.startswith("menu "): @@ -113,9 +114,9 @@ class CommentsMenusPackagesOrder(_CheckFunction): elif text.startswith("endmenu"): self.state = self.state[:-5] - elif m: + elif source_line: level = self.get_level() - new_package = m.group(1) + new_package = source_line.group(1) # We order _ before A, so replace it with . new_package_ord = new_package.replace('_', '.')
Rename variable 'm' for better readability. Signed-off-by: Jerzy Grzegorek <jerzy.m.grzegorek@gmail.com> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> --- utils/checkpackagelib/lib_config.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)