From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 74oVCBg8+WNIzgAAbAwnHQ (envelope-from ) for ; Fri, 24 Feb 2023 23:37:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id eEBFBxg8+WOkdQEAauVa8A (envelope-from ) for ; Fri, 24 Feb 2023 23:37:12 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 836F129A1E for ; Fri, 24 Feb 2023 23:37:11 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677278231; a=rsa-sha256; cv=none; b=cVuJZorCp+8bLywqxKa8/pu1WQ4LdHpQuY9ZBBl7SR/bW8r8e3b+/EhIn/Y2a+6231okyw s1RbOVv3iGLE9tidBYzDIfr8sr2i5KQnuaIoUlpxaGASRZZPWssZHJ7ue6MECB4EX3+vll V2Q7st6c6HwO+K7tc78Hm5Tl9Vu321AZ2ahtTd0LKCmr26JQ6xQD2u+Ov+cIa0USXpMTQ7 OK+fB+N4VtQ952WCFnMi1eds/20aGCdbPH8EYivQnX5qcGCm98vLqj4h28jvOc5NkmaS7K uAL7DfAC2DT1OV6FTXhaT1bjsd/MsiEsgslDkpAmVkLV2H9SAgAe1QT7kdRFUQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677278231; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=E834oMlG7YOzsACoiS2Mx6R+tjHSJd368XRu3WmtQ/c=; b=ev7n7oh0nGRpIAEOF9YMO5RbIIiQYW2iFZuTqeGQA9R+73UYhGJJjw/OVBtUr8a6U4CNen 5MxfVHrhpydsTL0TSRvCho/61dUjZNyLyn7zKjsg5KzuyhrfP/tj/Y3IGY5DlHkaoEHFui lmnI6Q+TqJLUWEm4fqmOzSWsDkiIQ8uO6ihLtlZfju1vFo3YNN6SVnFB+nginVcCjGFgTl lwyRmPV5y8hTTIYYn4tfbmgieBPaD6J4HIgmEpS6K8x8ZsOj/Q3MatJuJqZutX43JB5k+0 QpmIp6sawhX1KchDJv8uqgT8AS09lZqE5eYtO7xcFy7ht6EEyaxVvmCm13Kcag== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVggb-0007Ul-7t; Fri, 24 Feb 2023 17:37:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVggY-0007UM-P2 for guix-patches@gnu.org; Fri, 24 Feb 2023 17:37:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVggY-0002CR-8K for guix-patches@gnu.org; Fri, 24 Feb 2023 17:37:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVggY-0004I1-4H for guix-patches@gnu.org; Fri, 24 Feb 2023 17:37:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61773] [PATCH] gnu: Add actionlint. Resent-From: Timo Wilken Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 24 Feb 2023 22:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61773 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61773@debbugs.gnu.org Cc: Timo Wilken X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167727817016426 (code B ref -1); Fri, 24 Feb 2023 22:37:01 +0000 Received: (at submit) by debbugs.gnu.org; 24 Feb 2023 22:36:10 +0000 Received: from localhost ([127.0.0.1]:38474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVgfi-0004Gs-4H for submit@debbugs.gnu.org; Fri, 24 Feb 2023 17:36:10 -0500 Received: from lists.gnu.org ([209.51.188.17]:46670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVgfg-0004Gh-2X for submit@debbugs.gnu.org; Fri, 24 Feb 2023 17:36:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVgfd-0007Qw-Tw for guix-patches@gnu.org; Fri, 24 Feb 2023 17:36:05 -0500 Received: from mx2.mythic-beasts.com ([2a00:1098:0:82:1000:0:2:1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVgfa-0001yb-HW for guix-patches@gnu.org; Fri, 24 Feb 2023 17:36:05 -0500 Received: by mailhub-hex-d.mythic-beasts.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pVgfX-00C4mt-HC; Fri, 24 Feb 2023 22:35:59 +0000 From: Timo Wilken Date: Fri, 24 Feb 2023 23:35:37 +0100 Message-Id: <20230224223537.23194-1-guix@twilken.net> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BlackCat-Spam-Score: 9 Received-SPF: pass client-ip=2a00:1098:0:82:1000:0:2:1; envelope-from=guix@twilken.net; helo=mx2.mythic-beasts.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: X-Migadu-Queue-Id: 836F129A1E X-Spam-Score: -1.38 X-Migadu-Spam-Score: -1.38 X-Migadu-Scanner: scn0.migadu.com List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-TUID: /mNsE9teJN6T 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 ;;; Copyright © 2022 jgart ;;; Copyright © 2023 Luis Felipe López Acevedo +;;; Copyright © 2023 Timo Wilken ;;; ;;; 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 ;;; Copyright © 2022 ( ;;; Copyright © 2023 Hilton Chain +;;; Copyright © 2023 Timo Wilken ;;; ;;; 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