From cc07f6ebf70bf410dd728a1121e8969f5b7a56d7 Mon Sep 17 00:00:00 2001 From: Tom Browder Date: Fri, 17 May 2024 07:45:04 -0500 Subject: [PATCH] looking good --- .gitignore | 1 + lib/Mi6/Utils.rakumod | 19 +++++++++++-------- run.sh | 2 -- 3 files changed, 12 insertions(+), 10 deletions(-) delete mode 100755 run.sh diff --git a/.gitignore b/.gitignore index 98c96bb..9d57079 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ dev/*.json debug-test/ Foo-Bar/ .Foo-Bar +lint-results.txt diff --git a/lib/Mi6/Utils.rakumod b/lib/Mi6/Utils.rakumod index 4eb0b4a..6661ee5 100644 --- a/lib/Mi6/Utils.rakumod +++ b/lib/Mi6/Utils.rakumod @@ -154,11 +154,11 @@ multi sub action(@args) is export { unless $parent-dir.IO.d; say "Using directory '$parent-dir' as the working directory."; - # take care of the module directory: replace '::' with '-' - $module-dir = $module-name; - $module-dir ~~ s:g/'::'/-/; - if $new { + # take care of the module directory: replace '::' with '-' + $module-dir = $module-name; + $module-dir ~~ s:g/'::'/-/; + mi6-helper-new :$parent-dir, :$module-dir, :$module-name, :$provides, :$debug, :$debug2; say qq:to/HERE/; @@ -170,8 +170,10 @@ multi sub action(@args) is export { if $lint { my $lint-results = lint $parent-dir, :$debug; + my $ofil = "lint-results.txt"; + spurt $ofil, $lint-results; say qq:to/HERE/; - Exit after 'lint' mode run. See results in file '$lint-results' + Exit after 'lint' mode run. See results in file '$ofil' in directory '$parent-dir'. HERE exit; @@ -200,8 +202,8 @@ sub lint($dir, :$debug, --> Str) is export { } # get contents of the META6.json file - my %m = from-json {slurp "$dir/META6.json"}; - my @r2 = %m; + my %m = from-json(slurp "$dir/META6.json"); + my @r2 = @(%m); if 1 { say "DEBUG META6.json resources:"; say " $_" for @r2; @@ -219,7 +221,8 @@ sub lint($dir, :$debug, --> Str) is export { # check the .github/workflows file(s) # check all 'use X' modules are in META6.json depends - + + $issues; } diff --git a/run.sh b/run.sh deleted file mode 100755 index 69cc800..0000000 --- a/run.sh +++ /dev/null @@ -1,2 +0,0 @@ -raku -I. bin/* lint .. -