From 1dc571b4d6600d4711b3d7a08fcab6dfa91bb72b Mon Sep 17 00:00:00 2001 From: James Pond Date: Mon, 14 Apr 2025 21:21:46 -0300 Subject: [PATCH 1/5] Update GitHub Actions dependencies Signed-off-by: James Pond --- .github/workflows/ci.yml | 6 +++--- .github/workflows/lint-licenses.yml | 4 ++-- .github/workflows/lint.yml | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f937d02..a24e247 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: runs-on: 'ubuntu-latest' name: 'Tests' steps: - - uses: 'step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e' # v2.10.4 + - uses: 'step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf' # v2.11.1 with: egress-policy: 'audit' @@ -44,12 +44,12 @@ jobs: persist-credentials: 'false' - name: 'Setup Go environment' - uses: 'actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34' # v5.3.0 + uses: 'actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b' # v5.4.0 with: go-version: '>=1.24' - name: 'Setup Node.js environment' - uses: 'actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a' # v4.2.0 + uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # v4.4.0 with: node-version: 'latest' diff --git a/.github/workflows/lint-licenses.yml b/.github/workflows/lint-licenses.yml index f7ab2b0..6b1302f 100644 --- a/.github/workflows/lint-licenses.yml +++ b/.github/workflows/lint-licenses.yml @@ -16,7 +16,7 @@ jobs: name: 'Check all files' runs-on: 'ubuntu-latest' steps: - - uses: 'step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e' # v2.10.4 + - uses: 'step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf' # v2.11.1 with: egress-policy: 'audit' @@ -25,7 +25,7 @@ jobs: persist-credentials: false - name: 'Setup Python environment' - uses: 'actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38' # v5.4.0 + uses: 'actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55' # v5.5.0 with: python-version: '3.13' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f17d970..5df122b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -28,7 +28,7 @@ jobs: name: 'Lint all files' runs-on: 'ubuntu-latest' steps: - - uses: 'step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e' # v2.10.4 + - uses: 'step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf' # v2.11.1 with: egress-policy: 'audit' @@ -37,12 +37,12 @@ jobs: persist-credentials: false - name: 'Setup Go environment' - uses: 'actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34' # v5.3.0 + uses: 'actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b' # v5.4.0 with: go-version: '>=1.24' - name: 'Setup Node.js environment' - uses: 'actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a' # v4.2.0 + uses: 'actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020' # v4.4.0 with: node-version: 'latest' From c2ae4db821c8bfe2bf6c3ccfb62ca85aa56f99d8 Mon Sep 17 00:00:00 2001 From: James Pond Date: Mon, 14 Apr 2025 21:25:26 -0300 Subject: [PATCH 2/5] Bump blevesearch/bleve to v2.5.0 Signed-off-by: James Pond --- go.mod | 28 ++++++++++++++-------------- go.sum | 58 +++++++++++++++++++++++++++++++--------------------------- 2 files changed, 45 insertions(+), 41 deletions(-) diff --git a/go.mod b/go.mod index 250e36f..3eb90ac 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( git.sr.ht/~jamesponddotco/credential-go v1.0.0 git.sr.ht/~jamesponddotco/xstd-go v0.13.1 github.com/alecthomas/chroma v0.10.0 - github.com/blevesearch/bleve/v2 v2.4.4 + github.com/blevesearch/bleve/v2 v2.5.0 github.com/json-iterator/go v1.1.12 github.com/microcosm-cc/bluemonday v1.0.27 go.cipher.host/cmdkit v1.0.2 @@ -20,30 +20,30 @@ require ( ) require ( - github.com/RoaringBitmap/roaring v1.9.3 // indirect + github.com/RoaringBitmap/roaring/v2 v2.4.5 // indirect github.com/aymerick/douceur v0.2.0 // indirect - github.com/bits-and-blooms/bitset v1.12.0 // indirect - github.com/blevesearch/bleve_index_api v1.1.12 // indirect + github.com/bits-and-blooms/bitset v1.22.0 // indirect + github.com/blevesearch/bleve_index_api v1.2.7 // indirect github.com/blevesearch/geo v0.1.20 // indirect - github.com/blevesearch/go-faiss v1.0.24 // indirect + github.com/blevesearch/go-faiss v1.0.25 // indirect github.com/blevesearch/go-porterstemmer v1.0.3 // indirect github.com/blevesearch/gtreap v0.1.1 // indirect github.com/blevesearch/mmap-go v1.0.4 // indirect - github.com/blevesearch/scorch_segment_api/v2 v2.2.16 // indirect + github.com/blevesearch/scorch_segment_api/v2 v2.3.9 // indirect github.com/blevesearch/segment v0.9.1 // indirect github.com/blevesearch/snowballstem v0.9.0 // indirect github.com/blevesearch/upsidedown_store_api v1.0.2 // indirect - github.com/blevesearch/vellum v1.0.10 // indirect - github.com/blevesearch/zapx/v11 v11.3.10 // indirect - github.com/blevesearch/zapx/v12 v12.3.10 // indirect - github.com/blevesearch/zapx/v13 v13.3.10 // indirect - github.com/blevesearch/zapx/v14 v14.3.10 // indirect - github.com/blevesearch/zapx/v15 v15.3.16 // indirect - github.com/blevesearch/zapx/v16 v16.1.9-0.20241217210638-a0519e7caf3b // indirect + github.com/blevesearch/vellum v1.1.0 // indirect + github.com/blevesearch/zapx/v11 v11.4.1 // indirect + github.com/blevesearch/zapx/v12 v12.4.1 // indirect + github.com/blevesearch/zapx/v13 v13.4.1 // indirect + github.com/blevesearch/zapx/v14 v14.4.1 // indirect + github.com/blevesearch/zapx/v15 v15.4.1 // indirect + github.com/blevesearch/zapx/v16 v16.2.2 // indirect github.com/dlclark/regexp2 v1.4.0 // indirect github.com/golang/geo v0.0.0-20210211234256-740aa86cb551 // indirect github.com/golang/protobuf v1.3.2 // indirect - github.com/golang/snappy v0.0.1 // indirect + github.com/golang/snappy v0.0.4 // indirect github.com/gorilla/css v1.0.1 // indirect github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect github.com/modern-go/reflect2 v1.0.2 // indirect diff --git a/go.sum b/go.sum index 5f815e2..2f2fe53 100644 --- a/go.sum +++ b/go.sum @@ -4,50 +4,51 @@ git.sr.ht/~jamesponddotco/credential-go v1.0.0 h1:sPeU9F2+pmW7uD4PzNUvxEVdcsjZRo git.sr.ht/~jamesponddotco/credential-go v1.0.0/go.mod h1:kZcSgGpswQVkMbQBYJYCAdbwuI4lVf2WN29xRDeC/wo= git.sr.ht/~jamesponddotco/xstd-go v0.13.1 h1:WSx3We/VOiZU9ohxxHXOoG48ZTp7RNMd+rY+/qlooXQ= git.sr.ht/~jamesponddotco/xstd-go v0.13.1/go.mod h1:2ImaAMHwlIUZQG4RDk7utC9ZG5HL+l6uQ3pwMjq1Q5s= -github.com/RoaringBitmap/roaring v1.9.3 h1:t4EbC5qQwnisr5PrP9nt0IRhRTb9gMUgQF4t4S2OByM= -github.com/RoaringBitmap/roaring v1.9.3/go.mod h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90= +github.com/RoaringBitmap/roaring/v2 v2.4.5 h1:uGrrMreGjvAtTBobc0g5IrW1D5ldxDQYe2JW2gggRdg= +github.com/RoaringBitmap/roaring/v2 v2.4.5/go.mod h1:FiJcsfkGje/nZBZgCu0ZxCPOKD/hVXDS2dXi7/eUFE0= github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek= github.com/alecthomas/chroma v0.10.0/go.mod h1:jtJATyUxlIORhUOFNA9NZDWGAQ8wpxQQqNSB4rjA/1s= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= -github.com/bits-and-blooms/bitset v1.12.0 h1:U/q1fAF7xXRhFCrhROzIfffYnu+dlS38vCZtmFVPHmA= github.com/bits-and-blooms/bitset v1.12.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= -github.com/blevesearch/bleve/v2 v2.4.4 h1:RwwLGjUm54SwyyykbrZs4vc1qjzYic4ZnAnY9TwNl60= -github.com/blevesearch/bleve/v2 v2.4.4/go.mod h1:fa2Eo6DP7JR+dMFpQe+WiZXINKSunh7WBtlDGbolKXk= -github.com/blevesearch/bleve_index_api v1.1.12 h1:P4bw9/G/5rulOF7SJ9l4FsDoo7UFJ+5kexNy1RXfegY= -github.com/blevesearch/bleve_index_api v1.1.12/go.mod h1:PbcwjIcRmjhGbkS/lJCpfgVSMROV6TRubGGAODaK1W8= +github.com/bits-and-blooms/bitset v1.22.0 h1:Tquv9S8+SGaS3EhyA+up3FXzmkhxPGjQQCkcs2uw7w4= +github.com/bits-and-blooms/bitset v1.22.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/blevesearch/bleve/v2 v2.5.0 h1:HzYqBy/5/M9Ul9ESEmXzN/3Jl7YpmWBdHM/+zzv/3k4= +github.com/blevesearch/bleve/v2 v2.5.0/go.mod h1:PcJzTPnEynO15dCf9isxOga7YFRa/cMSsbnRwnszXUk= +github.com/blevesearch/bleve_index_api v1.2.7 h1:c8r9vmbaYQroAMSGag7zq5gEVPiuXrUQDqfnj7uYZSY= +github.com/blevesearch/bleve_index_api v1.2.7/go.mod h1:rKQDl4u51uwafZxFrPD1R7xFOwKnzZW7s/LSeK4lgo0= github.com/blevesearch/geo v0.1.20 h1:paaSpu2Ewh/tn5DKn/FB5SzvH0EWupxHEIwbCk/QPqM= github.com/blevesearch/geo v0.1.20/go.mod h1:DVG2QjwHNMFmjo+ZgzrIq2sfCh6rIHzy9d9d0B59I6w= -github.com/blevesearch/go-faiss v1.0.24 h1:K79IvKjoKHdi7FdiXEsAhxpMuns0x4fM0BO93bW5jLI= -github.com/blevesearch/go-faiss v1.0.24/go.mod h1:OMGQwOaRRYxrmeNdMrXJPvVx8gBnvE5RYrr0BahNnkk= +github.com/blevesearch/go-faiss v1.0.25 h1:lel1rkOUGbT1CJ0YgzKwC7k+XH0XVBHnCVWahdCXk4U= +github.com/blevesearch/go-faiss v1.0.25/go.mod h1:OMGQwOaRRYxrmeNdMrXJPvVx8gBnvE5RYrr0BahNnkk= github.com/blevesearch/go-porterstemmer v1.0.3 h1:GtmsqID0aZdCSNiY8SkuPJ12pD4jI+DdXTAn4YRcHCo= github.com/blevesearch/go-porterstemmer v1.0.3/go.mod h1:angGc5Ht+k2xhJdZi511LtmxuEf0OVpvUUNrwmM1P7M= github.com/blevesearch/gtreap v0.1.1 h1:2JWigFrzDMR+42WGIN/V2p0cUvn4UP3C4Q5nmaZGW8Y= github.com/blevesearch/gtreap v0.1.1/go.mod h1:QaQyDRAT51sotthUWAH4Sj08awFSSWzgYICSZ3w0tYk= github.com/blevesearch/mmap-go v1.0.4 h1:OVhDhT5B/M1HNPpYPBKIEJaD0F3Si+CrEKULGCDPWmc= github.com/blevesearch/mmap-go v1.0.4/go.mod h1:EWmEAOmdAS9z/pi/+Toxu99DnsbhG1TIxUoRmJw/pSs= -github.com/blevesearch/scorch_segment_api/v2 v2.2.16 h1:uGvKVvG7zvSxCwcm4/ehBa9cCEuZVE+/zvrSl57QUVY= -github.com/blevesearch/scorch_segment_api/v2 v2.2.16/go.mod h1:VF5oHVbIFTu+znY1v30GjSpT5+9YFs9dV2hjvuh34F0= +github.com/blevesearch/scorch_segment_api/v2 v2.3.9 h1:X6nJXnNHl7nasXW+U6y2Ns2Aw8F9STszkYkyBfQ+p0o= +github.com/blevesearch/scorch_segment_api/v2 v2.3.9/go.mod h1:IrzspZlVjhf4X29oJiEhBxEteTqOY9RlYlk1lCmYHr4= github.com/blevesearch/segment v0.9.1 h1:+dThDy+Lvgj5JMxhmOVlgFfkUtZV2kw49xax4+jTfSU= github.com/blevesearch/segment v0.9.1/go.mod h1:zN21iLm7+GnBHWTao9I+Au/7MBiL8pPFtJBJTsk6kQw= github.com/blevesearch/snowballstem v0.9.0 h1:lMQ189YspGP6sXvZQ4WZ+MLawfV8wOmPoD/iWeNXm8s= github.com/blevesearch/snowballstem v0.9.0/go.mod h1:PivSj3JMc8WuaFkTSRDW2SlrulNWPl4ABg1tC/hlgLs= github.com/blevesearch/upsidedown_store_api v1.0.2 h1:U53Q6YoWEARVLd1OYNc9kvhBMGZzVrdmaozG2MfoB+A= github.com/blevesearch/upsidedown_store_api v1.0.2/go.mod h1:M01mh3Gpfy56Ps/UXHjEO/knbqyQ1Oamg8If49gRwrQ= -github.com/blevesearch/vellum v1.0.10 h1:HGPJDT2bTva12hrHepVT3rOyIKFFF4t7Gf6yMxyMIPI= -github.com/blevesearch/vellum v1.0.10/go.mod h1:ul1oT0FhSMDIExNjIxHqJoGpVrBpKCdgDQNxfqgJt7k= -github.com/blevesearch/zapx/v11 v11.3.10 h1:hvjgj9tZ9DeIqBCxKhi70TtSZYMdcFn7gDb71Xo/fvk= -github.com/blevesearch/zapx/v11 v11.3.10/go.mod h1:0+gW+FaE48fNxoVtMY5ugtNHHof/PxCqh7CnhYdnMzQ= -github.com/blevesearch/zapx/v12 v12.3.10 h1:yHfj3vXLSYmmsBleJFROXuO08mS3L1qDCdDK81jDl8s= -github.com/blevesearch/zapx/v12 v12.3.10/go.mod h1:0yeZg6JhaGxITlsS5co73aqPtM04+ycnI6D1v0mhbCs= -github.com/blevesearch/zapx/v13 v13.3.10 h1:0KY9tuxg06rXxOZHg3DwPJBjniSlqEgVpxIqMGahDE8= -github.com/blevesearch/zapx/v13 v13.3.10/go.mod h1:w2wjSDQ/WBVeEIvP0fvMJZAzDwqwIEzVPnCPrz93yAk= -github.com/blevesearch/zapx/v14 v14.3.10 h1:SG6xlsL+W6YjhX5N3aEiL/2tcWh3DO75Bnz77pSwwKU= -github.com/blevesearch/zapx/v14 v14.3.10/go.mod h1:qqyuR0u230jN1yMmE4FIAuCxmahRQEOehF78m6oTgns= -github.com/blevesearch/zapx/v15 v15.3.16 h1:Ct3rv7FUJPfPk99TI/OofdC+Kpb4IdyfdMH48sb+FmE= -github.com/blevesearch/zapx/v15 v15.3.16/go.mod h1:Turk/TNRKj9es7ZpKK95PS7f6D44Y7fAFy8F4LXQtGg= -github.com/blevesearch/zapx/v16 v16.1.9-0.20241217210638-a0519e7caf3b h1:ju9Az5YgrzCeK3M1QwvZIpxYhChkXp7/L0RhDYsxXoE= -github.com/blevesearch/zapx/v16 v16.1.9-0.20241217210638-a0519e7caf3b/go.mod h1:BlrYNpOu4BvVRslmIG+rLtKhmjIaRhIbG8sb9scGTwI= +github.com/blevesearch/vellum v1.1.0 h1:CinkGyIsgVlYf8Y2LUQHvdelgXr6PYuvoDIajq6yR9w= +github.com/blevesearch/vellum v1.1.0/go.mod h1:QgwWryE8ThtNPxtgWJof5ndPfx0/YMBh+W2weHKPw8Y= +github.com/blevesearch/zapx/v11 v11.4.1 h1:qFCPlFbsEdwbbckJkysptSQOsHn4s6ZOHL5GMAIAVHA= +github.com/blevesearch/zapx/v11 v11.4.1/go.mod h1:qNOGxIqdPC1MXauJCD9HBG487PxviTUUbmChFOAosGs= +github.com/blevesearch/zapx/v12 v12.4.1 h1:K77bhypII60a4v8mwvav7r4IxWA8qxhNjgF9xGdb9eQ= +github.com/blevesearch/zapx/v12 v12.4.1/go.mod h1:QRPrlPOzAxBNMI0MkgdD+xsTqx65zbuPr3Ko4Re49II= +github.com/blevesearch/zapx/v13 v13.4.1 h1:EnkEMZFUK0lsW/jOJJF2xOcp+W8TjEsyeN5BeAZEYYE= +github.com/blevesearch/zapx/v13 v13.4.1/go.mod h1:e6duBMlCvgbH9rkzNMnUa9hRI9F7ri2BRcHfphcmGn8= +github.com/blevesearch/zapx/v14 v14.4.1 h1:G47kGCshknBZzZAtjcnIAMn3oNx8XBLxp8DMq18ogyE= +github.com/blevesearch/zapx/v14 v14.4.1/go.mod h1:O7sDxiaL2r2PnCXbhh1Bvm7b4sP+jp4unE9DDPWGoms= +github.com/blevesearch/zapx/v15 v15.4.1 h1:B5IoTMUCEzFdc9FSQbhVOxAY+BO17c05866fNruiI7g= +github.com/blevesearch/zapx/v15 v15.4.1/go.mod h1:b/MreHjYeQoLjyY2+UaM0hGZZUajEbE0xhnr1A2/Q6Y= +github.com/blevesearch/zapx/v16 v16.2.2 h1:MifKJVRTEhMTgSlle2bDRTb39BGc9jXFRLPZc6r0Rzk= +github.com/blevesearch/zapx/v16 v16.2.2/go.mod h1:B9Pk4G1CqtErgQV9DyCSA9Lb7WZe4olYfGw7fVDZ4sk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -57,9 +58,11 @@ github.com/golang/geo v0.0.0-20210211234256-740aa86cb551 h1:gtexQ/VGyN+VVFRXSFig github.com/golang/geo v0.0.0-20210211234256-740aa86cb551/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/css v1.0.1 h1:ntNaBIghp6JmvWnxbZKANoLyuXTPZ4cAMlo6RyhlbO8= github.com/gorilla/css v1.0.1/go.mod h1:BvnYkspnSzMmwRK+b8/xgNPLiIuNZr6vbZBTPQ2A3b0= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -94,5 +97,6 @@ golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 1dafa57d2adb1091c3e1c551e58f7142531fb9f0 Mon Sep 17 00:00:00 2001 From: James Pond Date: Mon, 14 Apr 2025 21:27:03 -0300 Subject: [PATCH 3/5] Bump golang.org/x/time to v0.11.0 Signed-off-by: James Pond --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 3eb90ac..85490c6 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/microcosm-cc/bluemonday v1.0.27 go.cipher.host/cmdkit v1.0.2 go.etcd.io/bbolt v1.4.0 - golang.org/x/time v0.9.0 + golang.org/x/time v0.11.0 ) require ( diff --git a/go.sum b/go.sum index 2f2fe53..2e11a21 100644 --- a/go.sum +++ b/go.sum @@ -93,8 +93,8 @@ golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= -golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0= +golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 61e4398425c735428e3f7f788ab55a6af04704fd Mon Sep 17 00:00:00 2001 From: James Pond Date: Mon, 14 Apr 2025 21:29:11 -0300 Subject: [PATCH 4/5] Bump golangci-lint to v2 Signed-off-by: James Pond --- .golangci.yml | 312 ++++++++++++++++++++++++++------------------------ Makefile | 2 +- 2 files changed, 162 insertions(+), 152 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index ba15129..e5cf56c 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -2,8 +2,9 @@ # # SPDX-License-Identifier: CC0-1.0 +version: "2" linters: - disable-all: true + default: none enable: - asasalint - asciicheck @@ -25,7 +26,6 @@ linters: - exptostd - fatcontext - forcetypeassert - - gci - gocheckcompilerdirectives - gochecknoglobals - gochecknoinits @@ -36,11 +36,8 @@ linters: - gocyclo - godot - godox - - gofumpt - - goimports - goprintffuncname - gosec - - gosimple - gosmopolitan - govet - inamedparam @@ -70,12 +67,10 @@ linters: - sloglint - sqlclosecheck - staticcheck - - stylecheck - testableexamples - testpackage - thelper - tparallel - - typecheck - unconvert - unparam - unused @@ -84,151 +79,166 @@ linters: - wastedassign - wrapcheck - wsl - -linters-settings: - decorder: - dec-order: - - const - - var - - type - - func - errcheck: - check-type-assertions: true - check-blank: true - excluded-functions: - - encoding/json.Marshal - - encoding/json.MarshalIndent - errchkjson: - check-error-free-encoding: true - gocritic: - enabled-tags: - - diagnostic - - experimental - - style - - performance - - opinionated - gofumpt: - extra-rules: true - gosimple: - checks: ["all"] - govet: - enable-all: true - settings: - shadow: - strict: true - makezero: - always: true - misspell: - locale: US - nolintlint: - require-explanation: true - require-specific: true - prealloc: - simple: false - for-loops: true - revive: + settings: + decorder: + dec-order: + - const + - var + - type + - func + errcheck: + check-type-assertions: true + check-blank: true + errchkjson: + check-error-free-encoding: true + gocritic: + enabled-tags: + - diagnostic + - experimental + - style + - performance + - opinionated + govet: + enable-all: true + settings: + shadow: + strict: true + makezero: + always: true + misspell: + locale: US + nolintlint: + require-explanation: true + require-specific: true + prealloc: + simple: false + for-loops: true + revive: + rules: + - name: argument-limit + - name: atomic + - name: bare-return + - name: blank-imports + - name: bool-literal-in-expr + - name: call-to-gc + - name: comment-spacings + - name: confusing-naming + - name: confusing-results + - name: constant-logical-expr + - name: context-as-argument + - name: context-keys-type + - name: datarace + - name: deep-exit + - name: defer + - name: dot-imports + - name: duplicated-imports + - name: early-return + - name: empty-block + - name: empty-lines + - name: enforce-map-style + arguments: + - make + - name: enforce-slice-style + arguments: + - make + - name: error-naming + - name: error-return + - name: error-strings + - name: errorf + - name: exported + - name: flag-parameter + - name: function-result-limit + - name: get-return + - name: identical-branches + - name: if-return + - name: import-shadowing + - name: increment-decrement + - name: indent-error-flow + - name: modifies-parameter + - name: modifies-value-receiver + - name: nested-structs + - name: optimize-operands-order + - name: package-comments + - name: range + - name: range-val-address + - name: range-val-in-closure + - name: receiver-naming + - name: redefines-builtin-id + - name: redundant-import-alias + - name: string-of-int + - name: struct-tag + - name: superfluous-else + - name: time-equal + - name: time-naming + - name: unchecked-type-assertion + - name: unconditional-recursion + - name: unexported-naming + - name: unexported-return + - name: unnecessary-stmt + - name: unreachable-code + - name: unused-parameter + - name: unused-receiver + - name: use-any + - name: useless-break + - name: var-declaration + - name: var-naming + - name: waitgroup-by-value + sloglint: + no-global: default + args-on-sep-lines: true + staticcheck: + checks: + - all + unparam: + check-exported: true + usestdlibvars: + time-month: true + time-layout: true + crypto-hash: true + sql-isolation-level: true + tls-signature-scheme: true + constant-kind: true + usetesting: + os-setenv: true + os-temp-dir: true + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling rules: - - name: argument-limit - - name: atomic - - name: bare-return - - name: blank-imports - - name: bool-literal-in-expr - - name: call-to-gc - - name: comment-spacings - - name: confusing-naming - - name: confusing-results - - name: constant-logical-expr - - name: context-as-argument - - name: context-keys-type - - name: datarace - - name: deep-exit - - name: defer - - name: dot-imports - - name: duplicated-imports - - name: early-return - - name: empty-block - - name: empty-lines - - name: enforce-map-style - arguments: - - "make" - - name: enforce-slice-style - arguments: - - "make" - - name: error-naming - - name: error-return - - name: error-strings - - name: errorf - - name: exported - - name: flag-parameter - - name: function-result-limit - - name: get-return - - name: identical-branches - - name: if-return - - name: import-shadowing - - name: increment-decrement - - name: indent-error-flow - - name: modifies-parameter - - name: modifies-value-receiver - - name: nested-structs - - name: optimize-operands-order - - name: package-comments - - name: range - - name: range-val-address - - name: range-val-in-closure - - name: receiver-naming - - name: redefines-builtin-id - - name: redundant-import-alias - - name: string-of-int - - name: struct-tag - - name: superfluous-else - - name: time-equal - - name: time-naming - - name: unchecked-type-assertion - - name: unconditional-recursion - - name: unexported-naming - - name: unexported-return - - name: unnecessary-stmt - - name: unreachable-code - - name: unused-parameter - - name: unused-receiver - - name: use-any - - name: useless-break - - name: var-declaration - - name: var-naming - - name: waitgroup-by-value - sloglint: - no-global: "default" - args-on-sep-lines: true - staticcheck: - checks: ["all"] - stylecheck: - checks: ["all"] - usestdlibvars: - time-month: true - time-layout: true - crypto-hash: true - sql-isolation-level: true - tls-signature-scheme: true - constant-kind: true - usetesting: - os-setenv: true - os-temp-dir: true - unparam: - check-exported: true - + - linters: + - containedctx + - err113 + - gochecknoglobals + - gocognit + - maintidx + - nilerr + - nonamedreturns + - wrapcheck + path: _test\.go + - path: _test\.go + text: fieldalignment + paths: + - third_party$ + - builtin$ + - examples$ issues: max-issues-per-linter: 0 max-same-issues: 0 - exclude-rules: - - path: _test\.go - linters: - - containedctx - - err113 - - gochecknoglobals - - gocognit - - maintidx - - nilerr - - nonamedreturns - - wrapcheck - - path: _test\.go - text: "fieldalignment" +formatters: + enable: + - gci + - gofumpt + - goimports + settings: + gofumpt: + extra-rules: true + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ diff --git a/Makefile b/Makefile index 6300cfa..4fe6659 100644 --- a/Makefile +++ b/Makefile @@ -104,7 +104,7 @@ fmt: # Formats Go source files in this repository. $(GO) run mvdan.cc/gofumpt@latest -e -extra -w . lint: # Runs golangci-lint using the config at the root of the repository. - $(GO) run github.com/golangci/golangci-lint/cmd/golangci-lint@latest run ./... + $(GO) run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest run ./... lint/styles: # Runs stylelint on the CSS and SASS assets. $(STYLELINT) --quiet-deprecation-warnings \ From 4bf2e56f5532dc3e748ba068d6fbabf184f378f1 Mon Sep 17 00:00:00 2001 From: James Pond Date: Mon, 14 Apr 2025 21:43:45 -0300 Subject: [PATCH 5/5] Fix linter issue with golangci-lint v2 Signed-off-by: James Pond --- internal/testhelper/testhelper.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/testhelper/testhelper.go b/internal/testhelper/testhelper.go index 8cdb020..393f9af 100644 --- a/internal/testhelper/testhelper.go +++ b/internal/testhelper/testhelper.go @@ -8,7 +8,13 @@ package testhelper // IsHex returns true if the string contains only hexadecimal characters. func IsHex(str string) bool { for _, rune := range str { - if !((rune >= '0' && rune <= '9') || (rune >= 'a' && rune <= 'f') || (rune >= 'A' && rune <= 'F')) { + var ( + isDigit = rune >= '0' && rune <= '9' + isLowerHex = rune >= 'a' && rune <= 'f' + isUpperHex = rune >= 'A' && rune <= 'F' + ) + + if !isDigit && !isLowerHex && !isUpperHex { return false } }