From: Heiko Thiery <heiko.thiery@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] utils/check-package: add a check for the new spacing convention
Date: Wed, 5 Feb 2020 22:22:12 +0100 [thread overview]
Message-ID: <20200205212211.29720-1-heiko.thiery@gmail.com> (raw)
The seperation of the fields in the hash file should be 2 spaces for
consistency.
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
---
utils/checkpackagelib/lib_hash.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/utils/checkpackagelib/lib_hash.py b/utils/checkpackagelib/lib_hash.py
index 3e381119a5..87cc58a1bb 100644
--- a/utils/checkpackagelib/lib_hash.py
+++ b/utils/checkpackagelib/lib_hash.py
@@ -40,7 +40,7 @@ class HashType(_CheckFunction):
if len(fields) < 2:
return
- htype, hexa = fields[:2]
+ htype, hexa, filename = fields[:3]
if htype == "none":
return
if htype not in self.len_of_hash.keys():
@@ -53,3 +53,8 @@ class HashType(_CheckFunction):
.format(self.filename, lineno, self.url_to_manual),
text,
"expected {} hex digits".format(self.len_of_hash[htype])]
+ if not re.match(re.escape("^{} {} {}.*$".format(
+ htype, hexa, filename)), text):
+ return ["{}:{}: separation does not match expectation "
+ "({}#adding-packages-hash)"
+ .format(self.filename, lineno, self.url_to_manual), text]
--
2.20.1
next reply other threads:[~2020-02-05 21:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-05 21:22 Heiko Thiery [this message]
2020-05-31 12:28 ` [Buildroot] [PATCH 1/1] utils/check-package: add a check for the new spacing convention Yann E. MORIN
2020-05-31 12:41 ` Yann E. MORIN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200205212211.29720-1-heiko.thiery@gmail.com \
--to=heiko.thiery@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.