Manu NALEPA
8fa956036a
Update go.mod to v1.25.1. ( #15740 )
...
* Updated go.mod to v1.25.1.
Run `golangci-lint migrate`
GolangCI lint: Add `noinlineerr`.
Run `golangci-lint run --config=.golangci.yml`.
`golangci`: Add `--new`.
* `go.yml`: Added `fetch-depth: 0` to have something working with merge queue according to
https://github.com/golangci/golangci-lint-action/issues/956
---------
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com >
2025-09-24 19:57:17 +00:00
Preston Van Loon
d46ca97680
Update go to 1.24.0 ( #14969 )
...
* Update rules_go to v0.53.0
* Update staticcheck to v0.6.0
* Update to go 1.24.0
* Update github.com/trailofbits/go-mutexasserts to latest
* Use rules_go @ cf3c3af34bd869b864f5f2b98e2f41c2b220d6c9
* Provide the go binary to SszGen.
https://github.com/bazel-contrib/rules_go/pull/4173
* Unskip SA9003
* Update github ci checks to go1.24.0
* CI: Update gosec to v2.22.1 and golangci to v1..64.5
* Temporarily disable usetesting lint check for go1.24
* gosec: Disable G115 - integer overflow conversion
* gosec: Ignore G407 for "hardcoded" IV. It's not hardcoded.
* Fix uses of rand.Seed. This is a no-op in go1.24 and deprecated since go1.20.
* Changelog fragment
2025-03-05 17:46:39 +00:00
Nishant Das
5d6a406829
Update to Go 1.23 ( #14818 )
...
* Update to Go 1.23
* Update bazel version
* Update rules_go
* Use toolchains_protoc
* Update go_honnef_go_tools
* Update golang.org/x/tools
* Fix violations of SA3000
* Update errcheck by re-exporting the upstream repo
* Remove problematic ginkgo and gomega test helpers. Rewrote tests without these test libraries.
* Update go to 1.23.5
* gofmt with go1.23.5
* Revert Patch
* Unclog
* Update for go 1.23 support
* Fix Lint Issues
* Gazelle
* Fix Build
* Fix Lint
* no lint
* Fix lint
* Fix lint
* Disable intrange
* Preston's review
---------
Co-authored-by: Preston Van Loon <preston@pvl.dev >
2025-01-24 04:53:23 +00:00
Brindrajsinh Chauhan
79ea77ff57
update go version to 1.22.10 ( #14729 )
...
* update to go 1.22.10
* update change log
---------
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com >
2025-01-02 23:07:38 +00:00
Manu NALEPA
258908d50e
Diverse log improvements, comment additions and small refactors. ( #14658 )
...
* `logProposedBlock`: Fix log.
Before, the value of the pointer to the function were printed for `blockNumber`
instead of the block number itself.
* Add blob prefix before sidecars.
In order to prepare for data columns sidecars.
* Verification: Add log prefix.
* `validate_aggregate_proof.go`: Add comments.
* `blobSubscriber`: Fix error message.
* `registerHandlers`: Rename, add comments and little refactor.
* Remove duplicate `pb` vs. `ethpb` import.
* `rpc_ping.go`: Factorize / Add comments.
* `blobSidecarsByRangeRPCHandler`: Do not write error response if rate limited.
* `sendRecentBeaconBlocksRequest` ==> `sendBeaconBlocksRequest`.
The function itself does not know anything about the age of the beacon block.
* `beaconBlocksByRangeRPCHandler`: Refactor and add logs.
* `retentionSeconds` ==> `retentionDuration`.
* `oneEpoch`: Add documentation.
* `TestProposer_ProposeBlock_OK`: Improve error message.
* `getLocalPayloadFromEngine`: Tiny refactor.
* `eth1DataMajorityVote`: Improve log message.
* Implement `ConvertPeerIDToNodeID`and do note generate random private key if peerDAS is enabled.
* Remove useless `_`.
* `parsePeersEnr`: Fix error mesages.
* `ShouldOverrideFCU`: Fix error message.
* `blocks.go`: Minor comments improvements.
* CI: Upgrade golanci and enable spancheck.
* `ConvertPeerIDToNodeID`: Add godoc comment.
* Update CHANGELOG.md
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com >
* Update beacon-chain/sync/initial-sync/service_test.go
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com >
* Update beacon-chain/sync/rpc_beacon_blocks_by_range.go
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com >
* Update beacon-chain/sync/rpc_blob_sidecars_by_range.go
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com >
* Update beacon-chain/sync/rpc_ping.go
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com >
* Remove trailing whitespace in godoc.
---------
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com >
2024-11-25 09:22:33 +00:00
Taranpreet26311
19d9a1915d
PR to update workflow check dependencies ( #14379 )
...
* PR to update workflow check dependencies
* Updated build checkout version to v4
* Updated to go 1.23.0
* Updated lint version to v1.60.3
* Revert to 1.22.3
* Updated go to 1.23
* revert
* Updated setup-go to v5
* Update lint to 1.60.2
* Revert changes
* Update Lint version to v1.60.3
* Update lint to go 1.23.0
* Update golanci.yml to 1.23.0
* Revert and keep to golang 1.22.4
* Disable mnd
* Downgrade to current version
* Add update to go 1.26
* Update to go 1.22.6
* Update .golangci.yml to 1.22.6
2024-08-26 16:25:38 +00:00
Khanh Hoa
7a394062e1
refactor: enable errorlint and refactor code ( #14110 )
...
* refactor: enable errorlint and refactor code
* revert
* revert
* add bazel
* gofmt
* gofmt
* gofmt
* gofmt
* gci
* lint
---------
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2024-07-04 22:40:13 +00:00
Nishant Das
a8ecf5d118
Update to Go v1.22 ( #13965 )
...
* Bump go version up
* Update to go 1.22 compatible version
* Fix NoSec declarations
* Skip Gosec in GolangCi
* Avoid Bug In Analyzer
* Add in Gohashtree and Update to 1.22.4
* Fix Go Sum
2024-07-02 04:03:24 +00:00
Justin Traglia
835dce5f6e
Enable wastedassign linter & fix findings ( #13507 )
...
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2024-01-25 17:07:48 +00:00
Nishant Das
233f4d99a2
Update Libp2p To v0.32.1 and Go to v1.21.5 ( #13304 )
...
* update libp2p
* fix tests
* fix tests
* fix build
* update to go v1.21
* workflow
* workflow again
* update ci
* update golangci
* disable quic
2023-12-21 16:09:54 +00:00
Justin Traglia
1f6d1d1852
For golangci-lint, enable all by default ( #13353 )
...
* For golangci-lint, enable all by default
* Use latest golangci-lint here too
* Use v1.55.2 instead of latest
* Remove usestdlibvars from list
---------
Co-authored-by: terence <terence@prysmaticlabs.com >
2023-12-18 18:20:55 +00:00
Justin Traglia
ffe2f6b732
Enable mirror linter and fix findings ( #13342 )
...
* Enable mirror linter and fix findings
* Use latest version of golangci-lint
* Use v1.55.2 instead of latest
---------
Co-authored-by: terence <terence@prysmaticlabs.com >
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2023-12-18 12:16:26 +00:00
Justin Traglia
c56abfb840
Enable usestdlibvars linter and fix findings ( #13339 )
...
Co-authored-by: terence <terence@prysmaticlabs.com >
2023-12-15 19:21:54 +00:00
Justin Traglia
4a374435c0
Enable errname linter and fix findings ( #13341 )
2023-12-15 03:26:48 +00:00
Justin Traglia
4c916403e9
Enable dupword linter & fix findings ( #12271 )
...
* Enable dupword linter & fix findings
* Correct an incorrect fix
* Add nolint comment
* Add another nolint comment
* Revert unintended change to bazel version
---------
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com >
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2023-04-18 22:01:27 +00:00
Justin Traglia
b6181f8d1a
Enable nilerr linter & fix findings ( #12270 )
...
* Enable nilerr linter & fix findings
* Deal with other findings
* Fix another finding that I missed somehow
* Fix another another issue
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com >
* Update tests to expect error
---------
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
Co-authored-by: terencechain <terence@prysmaticlabs.com >
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com >
2023-04-18 20:53:16 +00:00
Justin Traglia
8428a79971
Enable whitespace linter & fix findings ( #12273 )
...
* Enable whitespace linter & fix findings
* Fix new finding
* fix new violation
---------
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com >
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com >
2023-04-18 18:58:27 +00:00
Justin Traglia
9f7711e74a
Enable misspell linter & fix findings ( #12272 )
...
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
2023-04-14 10:03:11 +00:00
Preston Van Loon
4b033f4cc7
Update go to 1.19.3 ( #11630 )
...
* Update go to 1.19.3
* Update other items to 1.19
* Update golangci-lint to latest release
* Run gofmt -s with go1.19
* Huge gofmt changes
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com >
2022-11-18 19:12:19 +00:00
Håvard Anda Estensen
4796827d22
Replace deprecated linter deadcode with unused ( #11334 )
...
* Replace deprecated linter deadcode with unused
* Ignore unused warnings
* Print filename and line number when linting fails
* Fix path
* Remove unused methods
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com >
Co-authored-by: terencechain <terence@prysmaticlabs.com >
2022-08-29 12:45:25 -04:00
Raul Jordan
82bbfce524
Use GolangCI-Lint for Goimports Checking Instead of Third-Party Image ( #11246 )
2022-08-17 17:15:08 +00:00
Taranpreet26311
ed07359573
Enable Gofmt Linting via Golang-CI Lint to Allow for Generic Code in Prysm ( #11205 )
...
* converting to generic
* enable gofmt linting
* enable gofmt
Co-authored-by: James He <james@prysmaticlabs.com >
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com >
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-08-17 13:53:46 +00:00
Jie Hou
56af079aea
Change gocognit complextity threshold to 65 ( #10906 )
...
Co-authored-by: Nishant Das <nishdas93@gmail.com >
2022-06-20 03:57:39 +00:00
Jie Hou
b04dd9fe5c
Enable gocognit linter ( #10867 )
...
* Enable gocognit linter
Currently the gocognit complexity threshold is set to 95 to make
sure no existing files will fail the linter. In future we will
reduce this threshold to a much lower one.
The recommended threshold is usually 30. Our code base has maximum
of 97 right now...But it's better late than never to pay attention
to our code compexity.
* Test to see github complains
* Resume to 97
Co-authored-by: Radosław Kapka <rkapka@wp.pl >
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com >
2022-06-14 14:19:34 +08:00
frederickalcantara
a170c69653
upgrading linter from gometalinter to golangci-lint ( #2100 )
...
* upgrading linter from gometalinter to golangci-lint
* fixed golangci-lint linting
* removed linting before_script command
* removed disable-all command
* Fixed golang config file
* fixed golang config file v2
* removed gosec issue rule
* formatting
* fixed travis build to run golangci-lint
* Add install golangci-lint command
* fixing golangci-lint script
* removed https://
* Added golangci-lint cmd script
* added go get for local lint install
* created a before_script
* add install before script
* Added get script
* added go mod download
* removed go mod downloads
* changed
* removed before script
* Added before script go get lint
* added exit zero to see what went wrong
* removed golang run script
* removed before script
* change lint command
* verbose output
* removed verbose
* change linter enable and disable configuration
* Update .golangci.yml
Removed gotype as a linter
* Update .golangci.yml
Added typecheck linter
* Update .golangci.yml
Added fixed lint version
* Update .golangci.yml
Added gotype
* Update .golangci.yml
Added typecheck
* removed env:lint
* Added env lint
* fixing lint upgrade
* Changing travis configuration
* FIxed spelling errors
* disabled typecheck
* Enabled typecheck
* remove binary
* Deleting lib binary
* adding more linters
* fixed constants
* fix spelling
* fixed all lint issues
* Revert "Changing travis configuration"
This reverts commit 334afe9d05 .
* Merge branch 'master' of https://github.com/prysmaticlabs/prysm into update-linter
* Changed from Infof to Info
* Fixing commits
* fixing commits with linter config
* added install
* Fixing
* fix log statement
2019-04-26 14:24:01 +08:00