GNU bug report logs - #61773
[PATCH] gnu: Add actionlint.

Previous Next

Package: guix-patches;

Reported by: Timo Wilken <guix <at> twilken.net>

Date: Fri, 24 Feb 2023 22:37:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 61773 in the body.
You can then email your comments to 61773 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#61773; Package guix-patches. (Fri, 24 Feb 2023 22:37:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Timo Wilken <guix <at> twilken.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 24 Feb 2023 22:37:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Timo Wilken <guix <at> twilken.net>
To: guix-patches <at> gnu.org
Cc: Timo Wilken <guix <at> twilken.net>
Subject: [PATCH] gnu: Add actionlint.
Date: Fri, 24 Feb 2023 23:35:37 +0100
Actionlint is a linter for GitHub Action workflow files.

* gnu/packages/check.scm (actionlint, go-github-com-robfig-cron-1.2): New variable.
* gnu/packages/golang.scm (go-golang.org-x-sync-semaphore): New variable.
---
 gnu/packages/check.scm  | 71 +++++++++++++++++++++++++++++++++++++++++
 gnu/packages/golang.scm | 12 +++++++
 2 files changed, 83 insertions(+)

diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 0866558ac2..4e907afeb6 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -42,6 +42,7 @@
 ;;; Copyright © 2022 Sharlatan Hellseher <sharlatanus <at> gmail.com>
 ;;; Copyright © 2022 jgart <jgart <at> dismail.de>
 ;;; Copyright © 2023 Luis Felipe López Acevedo <luis.felipe.la <at> protonmail.com>
+;;; Copyright © 2023 Timo Wilken <guix <at> twilken.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1028,6 +1029,76 @@ (define-public cpputest
 but it works for any C/C++ project.")
     (license license:bsd-3)))
 
+;; Required by actionlint. The version of `go-github-com-robfig-cron'
+;; packaged in Guix is newer and changed some error messages, causing
+;; unit tests in actionlint to fail.
+(define-public go-github-com-robfig-cron-1.2
+  (package
+    (inherit go-github-com-robfig-cron)
+    (name "go-github-com-robfig-cron")
+    (version "1.2.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/robfig/cron")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0nv31m3940d9kf38lw2zs4hpj435bdi9mmim098rb3n4l07qrvva"))))))
+
+(define-public actionlint
+  (package
+    (name "actionlint")
+    (version "1.6.23")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/rhysd/actionlint")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "07is4920a40zrl7mfldg0az2pisi7f6dv4vh3ijn3nzb4i7fqbni"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "github.com/rhysd/actionlint/cmd/actionlint"
+       #:unpack-path "github.com/rhysd/actionlint"
+       #:install-source? #f))
+    (inputs (list go-github-com-fatih-color
+                  go-github-com-mattn-go-colorable
+                  go-github-com-mattn-go-runewidth
+                  go-github-com-robfig-cron-1.2
+                  go-golang.org-x-sync-errgroup
+                  go-golang.org-x-sync-semaphore
+                  go-gopkg-in-yaml-v3))
+    (native-inputs (list go-github-com-google-go-cmp-cmp))
+    (home-page "https://rhysd.github.io/actionlint/")
+    (synopsis "Static checker for GitHub Actions workflow files")
+    (description
+     "actionlint is a static checker for GitHub Actions
+workflow files.  Features include:
+
+@itemize
+@item Syntax check for workflow files to check unexpected or missing
+keys following workflow syntax
+@item Strong type check for @code{$@{@{ @}@}} expressions to catch
+several semantic errors like access to not existing property, type
+mismatches, ...
+@item Actions usage check to check that inputs at @code{with:} and
+outputs in @code{steps.@{id@}.outputs} are correct
+@item Reusable workflow check to check inputs/outputs/secrets of
+reusable workflows and workflow calls
+@item shellcheck and pyflakes integrations for scripts at @code{run:}
+@item Security checks; script injection by untrusted inputs,
+hard-coded credentials
+@item Other several useful checks; glob syntax validation,
+dependencies check for @code{needs:}, runner label validation, cron
+syntax validation, ...
+@end itemize
+")
+    (license license:expat)))
+
 (define-public python-parameterized
   (package
     (name "python-parameterized")
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index c4b6bcd874..7268b661cf 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -39,6 +39,7 @@
 ;;; Copyright © 2022 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;; Copyright © 2022 ( <paren <at> disroot.org>
 ;;; Copyright © 2023 Hilton Chain <hako <at> ultrarare.space>
+;;; Copyright © 2023 Timo Wilken <guix <at> twilken.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -7409,6 +7410,17 @@ (define-public go-golang.org-x-sync-errgroup
       (home-page "https://godoc.org/golang.org/x/sync/errgroup")
       (license license:bsd-3))))
 
+(define-public go-golang.org-x-sync-semaphore
+  (package
+    (inherit go-golang.org-x-sync-errgroup)
+    (name "go-golang.org-x-sync-semaphore")
+    (arguments
+     '(#:import-path "golang.org/x/sync/semaphore"
+       #:unpack-path "golang.org/x/sync"))
+    (synopsis "Weighted semaphore implementation in Go")
+    (description "Weighted semaphore implementation in Go.")
+    (home-page "https://godoc.org/golang.org/x/sync/semaphore")))
+
 (define (go-gotest-tools-source version sha256-base32-hash)
   (origin
     (method git-fetch)
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61773; Package guix-patches. (Sun, 26 Feb 2023 17:44:01 GMT) Full text and rfc822 format available.

Message #8 received at 61773 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Timo Wilken <guix <at> twilken.net>
Cc: 61773 <at> debbugs.gnu.org
Subject: Re: [bug#61773] [PATCH] gnu: Add actionlint.
Date: Sun, 26 Feb 2023 12:43:21 -0500
On Fri, Feb 24, 2023 at 11:35:37PM +0100, Timo Wilken wrote:
> Actionlint is a linter for GitHub Action workflow files.
> 
> * gnu/packages/check.scm (actionlint, go-github-com-robfig-cron-1.2): New variable.
> * gnu/packages/golang.scm (go-golang.org-x-sync-semaphore): New variable.

I know it's annoying, but can you split this up into 3 patches? This is
our standard workflow for adding new packages. Thank you!




Information forwarded to guix-patches <at> gnu.org:
bug#61773; Package guix-patches. (Sun, 26 Feb 2023 19:14:02 GMT) Full text and rfc822 format available.

Message #11 received at 61773 <at> debbugs.gnu.org (full text, mbox):

From: Timo Wilken <guix <at> twilken.net>
To: 61773 <at> debbugs.gnu.org
Cc: Timo Wilken <guix <at> twilken.net>
Subject: [PATCH 0/3] gnu: Add actionlint.
Date: Sun, 26 Feb 2023 20:13:18 +0100
Hi Leo, I hope this is better!

Timo Wilken (3):
  gnu: Add go-golang.org-x-sync-semaphore.
  gnu: Add go-github-com-robfig-cron-1.2.
  gnu: Add actionlint.

 gnu/packages/check.scm  | 71 +++++++++++++++++++++++++++++++++++++++++
 gnu/packages/golang.scm | 12 +++++++
 2 files changed, 83 insertions(+)

-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61773; Package guix-patches. (Sun, 26 Feb 2023 19:14:02 GMT) Full text and rfc822 format available.

Message #14 received at 61773 <at> debbugs.gnu.org (full text, mbox):

From: Timo Wilken <guix <at> twilken.net>
To: 61773 <at> debbugs.gnu.org
Cc: Timo Wilken <guix <at> twilken.net>
Subject: [PATCH 1/3] gnu: Add go-golang.org-x-sync-semaphore.
Date: Sun, 26 Feb 2023 20:13:19 +0100
* gnu/packages/golang.scm (go-golang.org-x-sync-semaphore):
  New variable.
---
 gnu/packages/golang.scm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index c4b6bcd874..7268b661cf 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -39,6 +39,7 @@
 ;;; Copyright © 2022 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;; Copyright © 2022 ( <paren <at> disroot.org>
 ;;; Copyright © 2023 Hilton Chain <hako <at> ultrarare.space>
+;;; Copyright © 2023 Timo Wilken <guix <at> twilken.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -7409,6 +7410,17 @@ (define-public go-golang.org-x-sync-errgroup
       (home-page "https://godoc.org/golang.org/x/sync/errgroup")
       (license license:bsd-3))))
 
+(define-public go-golang.org-x-sync-semaphore
+  (package
+    (inherit go-golang.org-x-sync-errgroup)
+    (name "go-golang.org-x-sync-semaphore")
+    (arguments
+     '(#:import-path "golang.org/x/sync/semaphore"
+       #:unpack-path "golang.org/x/sync"))
+    (synopsis "Weighted semaphore implementation in Go")
+    (description "Weighted semaphore implementation in Go.")
+    (home-page "https://godoc.org/golang.org/x/sync/semaphore")))
+
 (define (go-gotest-tools-source version sha256-base32-hash)
   (origin
     (method git-fetch)
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61773; Package guix-patches. (Sun, 26 Feb 2023 19:14:02 GMT) Full text and rfc822 format available.

Message #17 received at 61773 <at> debbugs.gnu.org (full text, mbox):

From: Timo Wilken <guix <at> twilken.net>
To: 61773 <at> debbugs.gnu.org
Cc: Timo Wilken <guix <at> twilken.net>
Subject: [PATCH 2/3] gnu: Add go-github-com-robfig-cron-1.2.
Date: Sun, 26 Feb 2023 20:13:20 +0100
* gnu/packages/check.scm (go-github-com-robfig-cron-1.2):
  New variable.
---
 gnu/packages/check.scm | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 0866558ac2..c928d11f64 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -42,6 +42,7 @@
 ;;; Copyright © 2022 Sharlatan Hellseher <sharlatanus <at> gmail.com>
 ;;; Copyright © 2022 jgart <jgart <at> dismail.de>
 ;;; Copyright © 2023 Luis Felipe López Acevedo <luis.felipe.la <at> protonmail.com>
+;;; Copyright © 2023 Timo Wilken <guix <at> twilken.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1028,6 +1029,24 @@ (define-public cpputest
 but it works for any C/C++ project.")
     (license license:bsd-3)))
 
+;; Required by actionlint. The version of `go-github-com-robfig-cron'
+;; packaged in Guix is newer and changed some error messages, causing
+;; unit tests in actionlint to fail.
+(define-public go-github-com-robfig-cron-1.2
+  (package
+    (inherit go-github-com-robfig-cron)
+    (name "go-github-com-robfig-cron")
+    (version "1.2.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/robfig/cron")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0nv31m3940d9kf38lw2zs4hpj435bdi9mmim098rb3n4l07qrvva"))))))
+
 (define-public python-parameterized
   (package
     (name "python-parameterized")
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61773; Package guix-patches. (Sun, 26 Feb 2023 19:14:03 GMT) Full text and rfc822 format available.

Message #20 received at 61773 <at> debbugs.gnu.org (full text, mbox):

From: Timo Wilken <guix <at> twilken.net>
To: 61773 <at> debbugs.gnu.org
Cc: Timo Wilken <guix <at> twilken.net>
Subject: [PATCH 3/3] gnu: Add actionlint.
Date: Sun, 26 Feb 2023 20:13:21 +0100
Actionlint is a linter for GitHub Action workflow files.

* gnu/packages/check.scm (actionlint): New variable.
---
 gnu/packages/check.scm | 52 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index c928d11f64..4e907afeb6 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -1047,6 +1047,58 @@ (define-public go-github-com-robfig-cron-1.2
                (base32
                 "0nv31m3940d9kf38lw2zs4hpj435bdi9mmim098rb3n4l07qrvva"))))))
 
+(define-public actionlint
+  (package
+    (name "actionlint")
+    (version "1.6.23")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/rhysd/actionlint")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "07is4920a40zrl7mfldg0az2pisi7f6dv4vh3ijn3nzb4i7fqbni"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "github.com/rhysd/actionlint/cmd/actionlint"
+       #:unpack-path "github.com/rhysd/actionlint"
+       #:install-source? #f))
+    (inputs (list go-github-com-fatih-color
+                  go-github-com-mattn-go-colorable
+                  go-github-com-mattn-go-runewidth
+                  go-github-com-robfig-cron-1.2
+                  go-golang.org-x-sync-errgroup
+                  go-golang.org-x-sync-semaphore
+                  go-gopkg-in-yaml-v3))
+    (native-inputs (list go-github-com-google-go-cmp-cmp))
+    (home-page "https://rhysd.github.io/actionlint/")
+    (synopsis "Static checker for GitHub Actions workflow files")
+    (description
+     "actionlint is a static checker for GitHub Actions
+workflow files.  Features include:
+
+@itemize
+@item Syntax check for workflow files to check unexpected or missing
+keys following workflow syntax
+@item Strong type check for @code{$@{@{ @}@}} expressions to catch
+several semantic errors like access to not existing property, type
+mismatches, ...
+@item Actions usage check to check that inputs at @code{with:} and
+outputs in @code{steps.@{id@}.outputs} are correct
+@item Reusable workflow check to check inputs/outputs/secrets of
+reusable workflows and workflow calls
+@item shellcheck and pyflakes integrations for scripts at @code{run:}
+@item Security checks; script injection by untrusted inputs,
+hard-coded credentials
+@item Other several useful checks; glob syntax validation,
+dependencies check for @code{needs:}, runner label validation, cron
+syntax validation, ...
+@end itemize
+")
+    (license license:expat)))
+
 (define-public python-parameterized
   (package
     (name "python-parameterized")
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61773; Package guix-patches. (Sun, 26 Feb 2023 19:32:02 GMT) Full text and rfc822 format available.

Message #23 received at 61773 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Timo Wilken <guix <at> twilken.net>
Cc: 61773 <at> debbugs.gnu.org
Subject: Re: [bug#61773] [PATCH 0/3] gnu: Add actionlint.
Date: Sun, 26 Feb 2023 14:30:54 -0500
On Sun, Feb 26, 2023 at 08:13:18PM +0100, Timo Wilken wrote:
> Hi Leo, I hope this is better!
> 
> Timo Wilken (3):
>   gnu: Add go-golang.org-x-sync-semaphore.
>   gnu: Add go-github-com-robfig-cron-1.2.
>   gnu: Add actionlint.

Thanks! Pushed as eb87d2c4a0b5d817e50a43d9f16d204650dc02e8




bug closed, send any further explanations to 61773 <at> debbugs.gnu.org and Timo Wilken <guix <at> twilken.net> Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 30 Mar 2023 21:10:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 28 Apr 2023 11:24:15 GMT) Full text and rfc822 format available.

This bug report was last modified 361 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.