diff options
author | Gyorgy Sarvari <skandigraun@gmail.com> | 2025-09-14 19:47:09 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-09-18 11:16:34 +0100 |
commit | d8068d6c85c5e8e7f98ff6990c20897675f8b086 (patch) | |
tree | 60631b55a4ced84cf1798a7958233024ec1a6765 /meta/lib/patchtest/patchtest_patterns.py | |
parent | bcda889ef116d4ea3bdc68dc5d7be3641e5a49fc (diff) | |
download | poky-d8068d6c85c5e8e7f98ff6990c20897675f8b086.tar.gz |
patchtest: don't match BitBake python expansion as GitHub username
BitBake's Python expansion syntax looks very similar to GitHub usernames:
${@foo} - which triggers a false alarm from patchtest.
This patch adds a negative lookahead to the GitHub username matching pattern:
only match in case the pattern doesn't start with "${" characters.
Also add a test for it.
(From OE-Core rev: 6aa8eeadbb626bb5e5459ac2caf73b8fb0f2b936)
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/patchtest/patchtest_patterns.py')
-rw-r--r-- | meta/lib/patchtest/patchtest_patterns.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/patchtest/patchtest_patterns.py b/meta/lib/patchtest/patchtest_patterns.py index 50637cf499..655ecfd049 100644 --- a/meta/lib/patchtest/patchtest_patterns.py +++ b/meta/lib/patchtest/patchtest_patterns.py | |||
@@ -59,7 +59,7 @@ mbox_bugzilla_validation = pyparsing.Regex('\[(\s?YOCTO\s?#\s?(\d+)\s?,?)+\]') | |||
59 | mbox_revert_shortlog_regex = pyparsing.Regex('Revert\s+".*"') | 59 | mbox_revert_shortlog_regex = pyparsing.Regex('Revert\s+".*"') |
60 | mbox_shortlog_maxlength = 90 | 60 | mbox_shortlog_maxlength = 90 |
61 | # based on https://stackoverflow.com/questions/30281026/regex-parsing-github-usernames-javascript | 61 | # based on https://stackoverflow.com/questions/30281026/regex-parsing-github-usernames-javascript |
62 | mbox_github_username = pyparsing.Regex('\B@([a-z0-9](?:-(?=[a-z0-9])|[a-z0-9]){0,38}(?<=[a-z0-9]))') | 62 | mbox_github_username = pyparsing.Regex('\B(?<!\${)@([a-z0-9](?:-(?=[a-z0-9])|[a-z0-9]){0,38}(?<=[a-z0-9]))') |
63 | 63 | ||
64 | # patch | 64 | # patch |
65 | 65 | ||