From 29838a80abf783858bd602690b40b71d732490bc Mon Sep 17 00:00:00 2001 From: Kiko Fernandez-Reyes Date: Thu, 14 Nov 2024 19:45:42 +0100 Subject: [PATCH] gh: update compliance check file --- scripts/scan-code.escript | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/scan-code.escript b/scripts/scan-code.escript index 26518e68e241..82bb3d9daac4 100755 --- a/scripts/scan-code.escript +++ b/scripts/scan-code.escript @@ -21,7 +21,7 @@ %% %CopyrightEnd% main(Args) -> - argparse:run(Args, cli(), #{progname => otp_compliance}). + argparse:run(Args, cli(), #{progname => scancode}). cli() -> #{ help => @@ -77,6 +77,11 @@ template_option() -> scancode(#{ file_or_dir := FilesOrDirs}=Config) -> Files = string:split(FilesOrDirs, " ", all), + scancode0(Files, Config). + +scancode0([[]], _) -> + ok; +scancode0(Files, Config) -> Results = lists:foldl(fun (File, Errors) -> Command = scancode(Config, File), case execute(Command, File) of