* [Buildroot] [PATCH] utils/check-package: require exactly 1 TAB and 2 SP on help text 1st line
@ 2024-09-07 17:31 Yann E. MORIN
2024-09-14 21:50 ` Thomas Petazzoni via buildroot
2024-10-11 13:02 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Yann E. MORIN @ 2024-09-07 17:31 UTC (permalink / raw)
To: buildroot; +Cc: Florian Fainelli, Yann E. MORIN, Ricardo Martincoski
Test that the first line starts exactly with one TAB and exactly two
spaces before the text.
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Ricardo Martincoski <ricardo.martincoski@datacom.com.br>
---
utils/checkpackagelib/lib_config.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/utils/checkpackagelib/lib_config.py b/utils/checkpackagelib/lib_config.py
index f26ca0d898..bf975d7a3b 100644
--- a/utils/checkpackagelib/lib_config.py
+++ b/utils/checkpackagelib/lib_config.py
@@ -154,6 +154,7 @@ class CommentsMenusPackagesOrder(_CheckFunction):
class HelpText(_CheckFunction):
HELP_TEXT_FORMAT = re.compile(r"^\t .{,62}$")
+ HELP_TEXT_FORMAT_1 = re.compile(r"^\t \S.{,61}$")
URL_ONLY = re.compile(r"^(http|https|git)://\S*$")
def before(self):
@@ -170,12 +171,18 @@ class HelpText(_CheckFunction):
return
if text.strip() == "help":
self.help_text = True
+ self.help_first_line = True
return
if not self.help_text:
return
- if self.HELP_TEXT_FORMAT.match(text.rstrip()):
+ if self.help_first_line:
+ help_text_match = self.HELP_TEXT_FORMAT_1
+ self.help_first_line = False
+ else:
+ help_text_match = self.HELP_TEXT_FORMAT
+ if help_text_match.match(text.rstrip()):
return
if self.URL_ONLY.match(text.strip()):
return
--
2.46.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [Buildroot] [PATCH] utils/check-package: require exactly 1 TAB and 2 SP on help text 1st line
2024-09-07 17:31 [Buildroot] [PATCH] utils/check-package: require exactly 1 TAB and 2 SP on help text 1st line Yann E. MORIN
@ 2024-09-14 21:50 ` Thomas Petazzoni via buildroot
2024-10-11 13:02 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-09-14 21:50 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: Florian Fainelli, Ricardo Martincoski, buildroot
On Sat, 7 Sep 2024 19:31:23 +0200
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> Test that the first line starts exactly with one TAB and exactly two
> spaces before the text.
>
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: Ricardo Martincoski <ricardo.martincoski@datacom.com.br>
> ---
> utils/checkpackagelib/lib_config.py | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH] utils/check-package: require exactly 1 TAB and 2 SP on help text 1st line
2024-09-07 17:31 [Buildroot] [PATCH] utils/check-package: require exactly 1 TAB and 2 SP on help text 1st line Yann E. MORIN
2024-09-14 21:50 ` Thomas Petazzoni via buildroot
@ 2024-10-11 13:02 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2024-10-11 13:02 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: Florian Fainelli, Ricardo Martincoski, buildroot
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> Test that the first line starts exactly with one TAB and exactly two
> spaces before the text.
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: Ricardo Martincoski <ricardo.martincoski@datacom.com.br>
Committed to 2024.02.x and 2024.08.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-11 13:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-07 17:31 [Buildroot] [PATCH] utils/check-package: require exactly 1 TAB and 2 SP on help text 1st line Yann E. MORIN
2024-09-14 21:50 ` Thomas Petazzoni via buildroot
2024-10-11 13:02 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox