summaryrefslogtreecommitdiff
path: root/gnu/packages/golang-check.scm
diff options
context:
space:
mode:
authorSharlatan Hellseher <[email protected]>2025-01-08 23:54:01 +0000
committerSharlatan Hellseher <[email protected]>2025-01-21 23:47:47 +0000
commit5572b70e30bdf63276988e4ade49e55053127490 (patch)
treefadf7bd0ca29eb1b252f5f524e133f89398aafda /gnu/packages/golang-check.scm
parent7c3cd33092902344e51f3be836ccece03e3a8d75 (diff)
gnu: go-mvdan-cc-unparam: Move to golang-check.
* gnu/packages/golang.scm (go-mvdan-cc-unparam, unparam): Move from here ... * gnu/packages/golang-check.scm: ... to here. Change-Id: I4059ca18c951182d7fa186b8b9787992cfe90410
Diffstat (limited to 'gnu/packages/golang-check.scm')
-rw-r--r--gnu/packages/golang-check.scm47
1 files changed, 47 insertions, 0 deletions
diff --git a/gnu/packages/golang-check.scm b/gnu/packages/golang-check.scm
index abf9a5abd2..5a2a78efec 100644
--- a/gnu/packages/golang-check.scm
+++ b/gnu/packages/golang-check.scm
@@ -2463,6 +2463,44 @@ advanced Go linter.")
"This packge provides a test corpus of C code.")
(license license:bsd-3)))
+(define-public go-mvdan-cc-unparam
+ (package
+ (name "go-mvdan-cc-unparam")
+ (version "0.0.0-20240528143540-8a5130ca722f")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mvdan/unparam")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0qrwszcmb5slbzkq3acw57b896z22zwkv6cf6ldxwlc6p179g009"))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:skip-build? #t
+ #:import-path "mvdan.cc/unparam"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'check 'remove-failing-test-scripts
+ (lambda* (#:key import-path #:allow-other-keys)
+ (with-directory-excursion (string-append "src/" import-path)
+ (for-each delete-file
+ (list "testdata/script/usedas.txtar"
+ "testdata/script/stubs.txtar"
+ "testdata/script/impl.txtar"
+ "testdata/script/paramuses.txtar"))))))))
+ (propagated-inputs
+ (list go-github-com-pkg-diff
+ go-github-com-rogpeppe-go-internal
+ go-golang-org-x-tools))
+ (home-page "https://mvdan.cc/unparam/")
+ (synopsis "Find unused parameters in Go")
+ (description
+ "Reports unused function parameters and results in Go code.")
+ (license license:bsd-3)))
+
(define-public go-pgregory-net-rapid
(package
(name "go-pgregory-net-rapid")
@@ -2636,6 +2674,15 @@ prints an ASCII fraphic representing the memory layout.")))
" This package provides an command line interface (CLI)
tool."))))
+(define-public unparam
+ (package
+ (inherit go-mvdan-cc-unparam)
+ (name "unparam")
+ (arguments
+ (list #:tests? #f
+ #:install-source? #f
+ #:import-path "mvdan.cc/unparam"))))
+
;;;
;;; Avoid adding new packages to the end of this file. To reduce the chances
;;; of a merge conflict, place them above by existing packages with similar