From: Mickael RAMILISON <[email protected]> This introduces support for specifying a search pattern with the -p/--pattern option in the patchreview.py script. This is designed to accommodate the directory structure of meta-openembedded.
Signed-off-by: Mickael RAMILISON <[email protected]> Reviewed-by: Yoann Congal <[email protected]> --- Note: This patch will be followed by patches in yocto-autobuilder-helper using this to run patchmetrics on meta-openembedded. scripts/contrib/patchreview.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/contrib/patchreview.py b/scripts/contrib/patchreview.py index b22cc07f0a..43de105adc 100755 --- a/scripts/contrib/patchreview.py +++ b/scripts/contrib/patchreview.py @@ -207,10 +207,11 @@ if __name__ == "__main__": args.add_argument("-v", "--verbose", action="store_true", help="show per-patch results") args.add_argument("-g", "--histogram", action="store_true", help="show patch histogram") args.add_argument("-j", "--json", help="update JSON") + args.add_argument("-p", "--pattern", nargs=1, action="extend", default=["recipes-*/**/*.patch", "recipes-*/**/*.diff"], help="pattern to search recipes patch") args.add_argument("directory", help="directory to scan") args = args.parse_args() - patches = subprocess.check_output(("git", "-C", args.directory, "ls-files", "recipes-*/**/*.patch", "recipes-*/**/*.diff")).decode("utf-8").split() + patches = subprocess.check_output(("git", "-C", args.directory, "ls-files") + tuple(args.pattern)).decode("utf-8").split() results = patchreview(args.directory, patches) analyse(results, want_blame=args.blame, verbose=args.verbose) -- 2.30.2
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#188916): https://lists.openembedded.org/g/openembedded-core/message/188916 Mute This Topic: https://lists.openembedded.org/mt/101884042/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
