pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/go-staticcheck



Module Name:    pkgsrc
Committed By:   bsiegert
Date:           Sun Jul  9 19:10:21 UTC 2023

Modified Files:
        pkgsrc/devel/go-staticcheck: Makefile PLIST distinfo go-modules.mk

Log Message:
go-staticcheck: update to 2023.1.3

Staticcheck 2023.1.3

This release fixes the following bugs:

*   A crash when embedding type aliases of unnamed types
*   A false positive in U1000, claiming that type aliases are unused
*   A bug in the binary formatter that prevented correct merging behavior for
    some checks

Staticcheck 2023.1.2 (v0.4.2)

This release fixes a bug that prevented the binary formatter from working.

Staticcheck 2023.1.1 (v0.4.1)

This release fixes a crash, a false positive in U1000 and improves the way
deprecated API is flagged.

When targeting a Go version that is older than the version that deprecated an
API, SA1019 will no longer flag the use even if there is already an alternative
available in the targeted Go version.

For example, math/rand.Seed has been deprecated in Go 1.20, but an alternative
has existed since Go 1.0. In the past, we would flag uses of Seed even if
targeting e.g. Go 1.19, to encourage better forwards compatibility. This can
lead to unnecessary churn, however, because the correct change may depend on the
Go version in use. For example, for Seed before Go 1.20, the alternative is to
use a separate instance of math/rand.Rand, whereas in Go 1.20, a possible
alternative is to simply drop the call to Seed.

Staticcheck 2023.1 (v0.4.0)

Staticcheck 2023.1 adds support for Go 1.20, brings minor improvements to
various checks, and replaces U1000 with a new implementation.

The following checks have been improved:

*   The wording of S1001 has been made clearer for cases involving arrays.
    Furthermore, it no longer suggests using copy when the function has been
    shadowed.
*   S1011 now recognizes index-based loops.
*   SA1019 no longer flags tests (internal or external) that use deprecated API
    from the package under test. Furthermore, entire declaration groups (such as
    groups of constants) can now be marked as deprecated.
*   SA4017 now detects more functions, including those in the time package.
    Additionally, its wording has been made clearer.
*   SA5010 no longer gets confused by type assertions involving generic types.
*   ST1005 no longer flags errors that start with alpha-numeric acronyms such as
    P384.
*   Improvements to our intermediate representation may allow various checks to
    find more problems.

Staticcheck now knows about version 2 of the k8s.io/klog package, in particular
which functions abort control flow.

In addition to these minor improvements, U1000 has been rewritten from the
ground up, operating on a program representation more suited to the task. In
practice this means that there will be fewer false positives and more true
positives.

Overall, the rewrite fixes at least eight known bugs, both ones that have been a
nuisance for a while, as well as ones newly introduced by generics.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 pkgsrc/devel/go-staticcheck/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/devel/go-staticcheck/PLIST
cvs rdiff -u -r1.2 -r1.3 pkgsrc/devel/go-staticcheck/distinfo \
    pkgsrc/devel/go-staticcheck/go-modules.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/go-staticcheck/Makefile
diff -u pkgsrc/devel/go-staticcheck/Makefile:1.18 pkgsrc/devel/go-staticcheck/Makefile:1.19
--- pkgsrc/devel/go-staticcheck/Makefile:1.18   Wed Apr  5 20:48:01 2023
+++ pkgsrc/devel/go-staticcheck/Makefile        Sun Jul  9 19:10:21 2023
@@ -1,10 +1,9 @@
-# $NetBSD: Makefile,v 1.18 2023/04/05 20:48:01 bsiegert Exp $
+# $NetBSD: Makefile,v 1.19 2023/07/09 19:10:21 bsiegert Exp $
 
 GITHUB_PROJECT=        go-tools
-GITHUB_TAG=    2022.1
-DISTNAME=      go-tools-2022.1
+GITHUB_TAG=    2023.1.3
+DISTNAME=      go-tools-${GITHUB_TAG}
 PKGNAME=       go-staticcheck-${GITHUB_TAG}
-PKGREVISION=   13
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=dominikh/}
 

Index: pkgsrc/devel/go-staticcheck/PLIST
diff -u pkgsrc/devel/go-staticcheck/PLIST:1.1 pkgsrc/devel/go-staticcheck/PLIST:1.2
--- pkgsrc/devel/go-staticcheck/PLIST:1.1       Thu Jan 20 17:33:09 2022
+++ pkgsrc/devel/go-staticcheck/PLIST   Sun Jul  9 19:10:21 2023
@@ -1,6 +1,7 @@
-@comment $NetBSD: PLIST,v 1.1 2022/01/20 17:33:09 bsiegert Exp $
+@comment $NetBSD: PLIST,v 1.2 2023/07/09 19:10:21 bsiegert Exp $
 bin/keyify
 bin/staticcheck
 bin/structlayout
 bin/structlayout-optimize
 bin/structlayout-pretty
+bin/unused

Index: pkgsrc/devel/go-staticcheck/distinfo
diff -u pkgsrc/devel/go-staticcheck/distinfo:1.2 pkgsrc/devel/go-staticcheck/distinfo:1.3
--- pkgsrc/devel/go-staticcheck/distinfo:1.2    Sun Apr 17 19:09:40 2022
+++ pkgsrc/devel/go-staticcheck/distinfo        Sun Jul  9 19:10:21 2023
@@ -1,41 +1,35 @@
-$NetBSD: distinfo,v 1.2 2022/04/17 19:09:40 bsiegert Exp $
+$NetBSD: distinfo,v 1.3 2023/07/09 19:10:21 bsiegert Exp $
 
-BLAKE2s (github.com__burnt_sushi_toml_@v_v0.4.1.mod) = cd3c2cea509a40639fa5501d594ba981c1385767f14e35780d21b8bd313977a4
-SHA512 (github.com__burnt_sushi_toml_@v_v0.4.1.mod) = 0e8cdda81300811f629bce3a9307de05450036f750f8c3c0cd5b70854f8f95bd962ce99bfe1325c8d1bf562a5b7b94afb9e9fd2dbe4dcc45325fac6e27471102
-Size (github.com__burnt_sushi_toml_@v_v0.4.1.mod) = 43 bytes
-BLAKE2s (github.com__burnt_sushi_toml_@v_v0.4.1.zip) = c85ccb82ebb46d112d42fd825289c803aa0bd4612dc529dc5cd7f904e2bc3d80
-SHA512 (github.com__burnt_sushi_toml_@v_v0.4.1.zip) = 33abab404112cf205bfc7a159328d2d570e36cc95e28ef6fc8d6c771ecedf6465d38e19156285f2ac55935437411ef4a4d30547b262a116755c16c3854cbc505
-Size (github.com__burnt_sushi_toml_@v_v0.4.1.zip) = 207306 bytes
-BLAKE2s (go-tools-2022.1.tar.gz) = 2a803a4e852b9b2361c64dc0ec44225d06a55831d9b28b63b7b68ab1f033baf7
-SHA512 (go-tools-2022.1.tar.gz) = 87302df4f4ddb23ffdd67f6b50124da684484599b5da6be7a10bdc94b320804e316c58ae1b24866a66c4b993dffb9a5d0c0dd978125913cac4d91b4ff6616df7
-Size (go-tools-2022.1.tar.gz) = 696634 bytes
-BLAKE2s (golang.org_x_exp_typeparams_@v_v0.0.0-20220218215828-6cf2b201936e.mod) = 947cc69a63c2828679b8e604444d7c943f31c286a6a019f442e36259d77cc741
-SHA512 (golang.org_x_exp_typeparams_@v_v0.0.0-20220218215828-6cf2b201936e.mod) = 
7b94a5aea463d66e1f88cee7198cbbad5b1f338a4e696a226241e2289020fed637a05cee80468ea07af0c6e307d8f7b9bec80f1d0b823a17b2c1efe7306ddd13
-Size (golang.org_x_exp_typeparams_@v_v0.0.0-20220218215828-6cf2b201936e.mod) = 44 bytes
-BLAKE2s (golang.org_x_exp_typeparams_@v_v0.0.0-20220218215828-6cf2b201936e.zip) = 5dc66d844df5d96e0def239213b82cd2f867cc56c392135aeb3a07285af588b5
-SHA512 (golang.org_x_exp_typeparams_@v_v0.0.0-20220218215828-6cf2b201936e.zip) = 
3da91d1b8d217672dec7fa7366975cb9522e6ddc8982824645c1e96f8d4bb9ee7cd857cda48e2e25e3b0868f7a0884842ec9e051c86c38918b3928fd973b1726
-Size (golang.org_x_exp_typeparams_@v_v0.0.0-20220218215828-6cf2b201936e.zip) = 19970 bytes
-BLAKE2s (golang.org_x_mod_@v_v0.6.0-dev.0.20220106191415-9b9b3d81d5e3.mod) = dd937abe8e1e603b1bf57c96cdcca74fefc9f05c7da84b45ae958f5be2d3754a
-SHA512 (golang.org_x_mod_@v_v0.6.0-dev.0.20220106191415-9b9b3d81d5e3.mod) = 
8ad9ed616127b7e63049d470e02d2ab91345b3feaea4848702a67d1d39069e2a50743d7684cf35341bc0acf5594409025f6dd67d1a61edfbaf68b5e51ff4e8db
-Size (golang.org_x_mod_@v_v0.6.0-dev.0.20220106191415-9b9b3d81d5e3.mod) = 214 bytes
-BLAKE2s (golang.org_x_mod_@v_v0.6.0-dev.0.20220106191415-9b9b3d81d5e3.zip) = 27423131e4122185bdce71aba6d0908dddb861b6b65e028602a62e1acb7177f0
-SHA512 (golang.org_x_mod_@v_v0.6.0-dev.0.20220106191415-9b9b3d81d5e3.zip) = 
3aca63d656dc70e1ad3e4a74917cc43f97ca42ca0491cd526632f70a3ca65a5aedd279d4efc6e276b6678070d4d31bc47df371fa256e7167fae484418a611c12
-Size (golang.org_x_mod_@v_v0.6.0-dev.0.20220106191415-9b9b3d81d5e3.zip) = 169189 bytes
-BLAKE2s (golang.org_x_sys_@v_v0.0.0-20211019181941-9d821ace8654.mod) = 66613eb38a59b8a7f75e1aaeb294a1c4ea290d4e9ae699137566025e50ed741c
-SHA512 (golang.org_x_sys_@v_v0.0.0-20211019181941-9d821ace8654.mod) = 85e511b1261c1935f5ee4754ad31d1d946f9e10f0af9905f44c4348d6ce5104319c03fb38517dde616698f6487b0c62788cfa96bc0ffb3b6db80accd7e552655
-Size (golang.org_x_sys_@v_v0.0.0-20211019181941-9d821ace8654.mod) = 33 bytes
-BLAKE2s (golang.org_x_sys_@v_v0.0.0-20211019181941-9d821ace8654.zip) = 5b3a0b705ddaeb2f05aa626730d5f1a1bfec110ae296ed4895c5c41cd2ce59aa
-SHA512 (golang.org_x_sys_@v_v0.0.0-20211019181941-9d821ace8654.zip) = 654a5674688eb771be446b9e163796fd709b2b742cdc2179a981a03127bee29f2e47b50da73c73021c6e1ec0a00dcca4cde53312f7ce5a30ec7d8a3c7cb5a466
-Size (golang.org_x_sys_@v_v0.0.0-20211019181941-9d821ace8654.zip) = 1667445 bytes
-BLAKE2s (golang.org_x_tools_@v_v0.1.11-0.20220316014157-77aa08bb151a.mod) = c8ce1e10cfdc4ff377db4028facd7583bccbbd50216dfcbdc38ce8a518cc577e
-SHA512 (golang.org_x_tools_@v_v0.1.11-0.20220316014157-77aa08bb151a.mod) = 
0e213cce8249c4a0585b951b87d7b5cbd2f233bf814c963b575ce795802ebf8ceb7922f16d28b31018c7bdfc4f118625d9f331cc98a86e4e6073b13e9b704f91
-Size (golang.org_x_tools_@v_v0.1.11-0.20220316014157-77aa08bb151a.mod) = 383 bytes
-BLAKE2s (golang.org_x_tools_@v_v0.1.11-0.20220316014157-77aa08bb151a.zip) = a0a554b214fdb625874febc59284f3c6205fdb2bc21cc8d50388949d0533b3c4
-SHA512 (golang.org_x_tools_@v_v0.1.11-0.20220316014157-77aa08bb151a.zip) = 
e49638db906ff415e96ba876257dbdd607c9557801820622307518c668a072fe23ff39e79b94ffbab5761e3e71c97af0d8a176ec4b8d750f5c19aec18dcedbd4
-Size (golang.org_x_tools_@v_v0.1.11-0.20220316014157-77aa08bb151a.zip) = 3910238 bytes
-BLAKE2s (golang.org_x_xerrors_@v_v0.0.0-20200804184101-5ec99f83aff1.mod) = b9082cd5be0cf4d922cd04363acc12692e595a5560e43763d016b9dafa566584
-SHA512 (golang.org_x_xerrors_@v_v0.0.0-20200804184101-5ec99f83aff1.mod) = 
659d18a7a3a1be45ff6dc9e7475276b82ee7f11c47d39b0c237d7f872836a1dbdfff0902f21d6cd8093663997865da92e3e5a4acf1ad6129f972dc5e667b4f05
-Size (golang.org_x_xerrors_@v_v0.0.0-20200804184101-5ec99f83aff1.mod) = 37 bytes
-BLAKE2s (golang.org_x_xerrors_@v_v0.0.0-20200804184101-5ec99f83aff1.zip) = ed7aee360529bbe4656b0d0a4585db3b8bd8a4620396d26b168a214ca2f8aad2
-SHA512 (golang.org_x_xerrors_@v_v0.0.0-20200804184101-5ec99f83aff1.zip) = 
34044424d303f5032d4fd302bbf1aca390d45e876583cc223fddf0d685a6eec2bde0a4c1b82c4e471eb5be97fc8aea9b14695b07940d1ecde806636a85d12051
-Size (golang.org_x_xerrors_@v_v0.0.0-20200804184101-5ec99f83aff1.zip) = 22295 bytes
+BLAKE2s (github.com__burnt_sushi_toml_@v_v1.2.1.mod) = cd3c2cea509a40639fa5501d594ba981c1385767f14e35780d21b8bd313977a4
+SHA512 (github.com__burnt_sushi_toml_@v_v1.2.1.mod) = 0e8cdda81300811f629bce3a9307de05450036f750f8c3c0cd5b70854f8f95bd962ce99bfe1325c8d1bf562a5b7b94afb9e9fd2dbe4dcc45325fac6e27471102
+Size (github.com__burnt_sushi_toml_@v_v1.2.1.mod) = 43 bytes
+BLAKE2s (github.com__burnt_sushi_toml_@v_v1.2.1.zip) = 172deba3f8187ec14c6d6c3401043bf3844ed4c27d8fffbb556c677cbe66c9aa
+SHA512 (github.com__burnt_sushi_toml_@v_v1.2.1.zip) = bf355ac81e5ecdb38b0839fe5f8258b0298806b99d1ee18365ef8d47acb5c9a8c41df6a736a437704cdac51b213e4bc181189885632b34315946888eb60ca958
+Size (github.com__burnt_sushi_toml_@v_v1.2.1.zip) = 238822 bytes
+BLAKE2s (go-tools-2023.1.3.tar.gz) = bb011bdf2cf30a8259052ba37043d02f6c0382765d34e17bf89712adc1be9ef8
+SHA512 (go-tools-2023.1.3.tar.gz) = fe371e20f98668d09a778bd7508d8e6b219762d02c7ccbfffbd1a2829f571007d32a499dd7a58ade49bdd8bb8b71d582b042099af2a6e7728afb1ef251658417
+Size (go-tools-2023.1.3.tar.gz) = 727784 bytes
+BLAKE2s (golang.org_x_exp_typeparams_@v_v0.0.0-20221208152030-732eee02a75a.mod) = 947cc69a63c2828679b8e604444d7c943f31c286a6a019f442e36259d77cc741
+SHA512 (golang.org_x_exp_typeparams_@v_v0.0.0-20221208152030-732eee02a75a.mod) = 
7b94a5aea463d66e1f88cee7198cbbad5b1f338a4e696a226241e2289020fed637a05cee80468ea07af0c6e307d8f7b9bec80f1d0b823a17b2c1efe7306ddd13
+Size (golang.org_x_exp_typeparams_@v_v0.0.0-20221208152030-732eee02a75a.mod) = 44 bytes
+BLAKE2s (golang.org_x_exp_typeparams_@v_v0.0.0-20221208152030-732eee02a75a.zip) = dda37c1d51a6d1331e0dcb3c557dd3934c15c96f08a38e6da475ae1e104e56f7
+SHA512 (golang.org_x_exp_typeparams_@v_v0.0.0-20221208152030-732eee02a75a.zip) = 
fb196abee92231d2b1b5344190e1246b1808755bf5624ae8ce1474bd209372cd99a21608eb987687a8ea68b7294add25fcee59070afdbb79b616797fdbd2698a
+Size (golang.org_x_exp_typeparams_@v_v0.0.0-20221208152030-732eee02a75a.zip) = 47479 bytes
+BLAKE2s (golang.org_x_mod_@v_v0.7.0.mod) = 46afeec3ff404db0c277f2327c09392ff6412842beaa74cc9cf91bb5a9210d96
+SHA512 (golang.org_x_mod_@v_v0.7.0.mod) = 76e9bc61587af5cca8e4b230f0f7e723e790d1c9d637e9db1e29d9ef49e0315ce611e3b94a2dee4ec7e1e672a3422dad4dec6efc9959eca6805fde6b7633ab83
+Size (golang.org_x_mod_@v_v0.7.0.mod) = 84 bytes
+BLAKE2s (golang.org_x_mod_@v_v0.7.0.zip) = 090a7b5fb69131c5f6811754bf11ad3f9ac5cc52e72637a9dd2ef0b66bf98eac
+SHA512 (golang.org_x_mod_@v_v0.7.0.zip) = 3cf55b009b680bebe1f173b1e284a447e4a87342645ba0a65efc8337ba558032bb17ac2376eddd3d629ee84870c613e3c8851181c583c08df2715e0bb1fb5c9b
+Size (golang.org_x_mod_@v_v0.7.0.zip) = 161744 bytes
+BLAKE2s (golang.org_x_sys_@v_v0.3.0.mod) = 66613eb38a59b8a7f75e1aaeb294a1c4ea290d4e9ae699137566025e50ed741c
+SHA512 (golang.org_x_sys_@v_v0.3.0.mod) = 85e511b1261c1935f5ee4754ad31d1d946f9e10f0af9905f44c4348d6ce5104319c03fb38517dde616698f6487b0c62788cfa96bc0ffb3b6db80accd7e552655
+Size (golang.org_x_sys_@v_v0.3.0.mod) = 33 bytes
+BLAKE2s (golang.org_x_sys_@v_v0.3.0.zip) = 196a4ed0cb55879c15c5dba9c1e69b04583fc328003580e6056c3de52a3fb310
+SHA512 (golang.org_x_sys_@v_v0.3.0.zip) = 0d14de6b67e169150564e56bf26f8f096f22ffdeba245b8e33b6d518fc5d482dc2da6b3633525cdc358173c9a4430bf914ae471546f0a49e2d7454c4ba33b35c
+Size (golang.org_x_sys_@v_v0.3.0.zip) = 1862151 bytes
+BLAKE2s (golang.org_x_tools_@v_v0.4.1-0.20221208213631-3f74d914ae6d.mod) = ae0db5b28b9eff9af0b5ba6fbe39a7a91b5f478a1694b5774a276cc6cc2563af
+SHA512 (golang.org_x_tools_@v_v0.4.1-0.20221208213631-3f74d914ae6d.mod) = 
17fcd7f4fe093e5c0a341652ba3a13813aef7be23710f1cfd8c3bcb4991239edf6bc4ca19dc7a2a365f92c67dedbc0d04cdec88f6c34722da0f3ed3dbe898c1d
+Size (golang.org_x_tools_@v_v0.4.1-0.20221208213631-3f74d914ae6d.mod) = 211 bytes
+BLAKE2s (golang.org_x_tools_@v_v0.4.1-0.20221208213631-3f74d914ae6d.zip) = 1e7dbbce72f73018a4bdf1059fb263c9530938ce3ce75bbc7c9498aecfa5333f
+SHA512 (golang.org_x_tools_@v_v0.4.1-0.20221208213631-3f74d914ae6d.zip) = 
3d682669785a9abf72611b5ed89535de197c4111ab90f1182470cafc54415e8c5feb123e59f747e53ed82c3f003d7142302c13efedcc94724e518b0a362e04cb
+Size (golang.org_x_tools_@v_v0.4.1-0.20221208213631-3f74d914ae6d.zip) = 3062141 bytes
Index: pkgsrc/devel/go-staticcheck/go-modules.mk
diff -u pkgsrc/devel/go-staticcheck/go-modules.mk:1.2 pkgsrc/devel/go-staticcheck/go-modules.mk:1.3
--- pkgsrc/devel/go-staticcheck/go-modules.mk:1.2       Sun Apr 17 19:09:40 2022
+++ pkgsrc/devel/go-staticcheck/go-modules.mk   Sun Jul  9 19:10:21 2023
@@ -1,14 +1,12 @@
-# $NetBSD: go-modules.mk,v 1.2 2022/04/17 19:09:40 bsiegert Exp $
+# $NetBSD: go-modules.mk,v 1.3 2023/07/09 19:10:21 bsiegert Exp $
 
-GO_MODULE_FILES+=      github.com/!burnt!sushi/toml/@v/v0.4.1.mod
-GO_MODULE_FILES+=      github.com/!burnt!sushi/toml/@v/v0.4.1.zip
-GO_MODULE_FILES+=      golang.org/x/exp/typeparams/@v/v0.0.0-20220218215828-6cf2b201936e.mod
-GO_MODULE_FILES+=      golang.org/x/exp/typeparams/@v/v0.0.0-20220218215828-6cf2b201936e.zip
-GO_MODULE_FILES+=      golang.org/x/mod/@v/v0.6.0-dev.0.20220106191415-9b9b3d81d5e3.mod
-GO_MODULE_FILES+=      golang.org/x/mod/@v/v0.6.0-dev.0.20220106191415-9b9b3d81d5e3.zip
-GO_MODULE_FILES+=      golang.org/x/sys/@v/v0.0.0-20211019181941-9d821ace8654.mod
-GO_MODULE_FILES+=      golang.org/x/sys/@v/v0.0.0-20211019181941-9d821ace8654.zip
-GO_MODULE_FILES+=      golang.org/x/tools/@v/v0.1.11-0.20220316014157-77aa08bb151a.mod
-GO_MODULE_FILES+=      golang.org/x/tools/@v/v0.1.11-0.20220316014157-77aa08bb151a.zip
-GO_MODULE_FILES+=      golang.org/x/xerrors/@v/v0.0.0-20200804184101-5ec99f83aff1.mod
-GO_MODULE_FILES+=      golang.org/x/xerrors/@v/v0.0.0-20200804184101-5ec99f83aff1.zip
+GO_MODULE_FILES+=      github.com/!burnt!sushi/toml/@v/v1.2.1.mod
+GO_MODULE_FILES+=      github.com/!burnt!sushi/toml/@v/v1.2.1.zip
+GO_MODULE_FILES+=      golang.org/x/exp/typeparams/@v/v0.0.0-20221208152030-732eee02a75a.mod
+GO_MODULE_FILES+=      golang.org/x/exp/typeparams/@v/v0.0.0-20221208152030-732eee02a75a.zip
+GO_MODULE_FILES+=      golang.org/x/mod/@v/v0.7.0.mod
+GO_MODULE_FILES+=      golang.org/x/mod/@v/v0.7.0.zip
+GO_MODULE_FILES+=      golang.org/x/sys/@v/v0.3.0.mod
+GO_MODULE_FILES+=      golang.org/x/sys/@v/v0.3.0.zip
+GO_MODULE_FILES+=      golang.org/x/tools/@v/v0.4.1-0.20221208213631-3f74d914ae6d.mod
+GO_MODULE_FILES+=      golang.org/x/tools/@v/v0.4.1-0.20221208213631-3f74d914ae6d.zip



Home | Main Index | Thread Index | Old Index