mergify[bot]
e914fe40ec
ci: Fix linter complaint (backport #9645 ) ( #9647 )
...
* ci: Fix linter complaint (#9645 )
Fixes a very silly linter complaint that makes absolutely no sense and is blocking the merging of several PRs.
---
#### PR checklist
- [x] Tests written/updated, or no tests needed
- [x] `CHANGELOG_PENDING.md` updated, or no changelog entry needed
- [x] Updated relevant documentation (`docs/`) and code comments, or no
documentation updates needed
(cherry picked from commit 83b7f4ad5b )
# Conflicts:
# .github/workflows/lint.yml
# .golangci.yml
# cmd/tendermint/commands/debug/util.go
* Resolve conflicts
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* ci: Sync golangci-lint config with main
Minus the spelling configuration that restricts spelling to US English
only.
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* make format
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Remove usage of deprecated io/ioutil package
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Remove unused mockBlockStore
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* blockchain/v2: Remove unused method
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Bulk fix lints
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* lint: Ignore auto-generated query PEG
Signed-off-by: Thane Thomson <connect@thanethomson.com >
Signed-off-by: Thane Thomson <connect@thanethomson.com >
Co-authored-by: Thane Thomson <connect@thanethomson.com >
2022-10-29 08:58:18 -04:00
mergify[bot]
4e25703d58
rpc/jsonrpc/server: return an error in WriteRPCResponseHTTP(Error) (bp #6204 ) ( #6230 )
...
* rpc/jsonrpc/server: return an error in WriteRPCResponseHTTP(Error) (#6204 )
instead of panicking
Closes #5529
(cherry picked from commit 00b9524168 )
# Conflicts:
# CHANGELOG_PENDING.md
# rpc/jsonrpc/server/http_json_handler.go
# rpc/jsonrpc/server/http_server.go
# rpc/jsonrpc/server/http_server_test.go
# rpc/jsonrpc/server/http_uri_handler.go
* resolve conflicts
* fix linting
* fix conflict
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com >
Co-authored-by: Marko Baricevic <marbar3778@yahoo.com >
2021-03-17 14:55:05 +00:00
Erik Grinaker
531fa07ad2
rpc: fix test data races ( #5363 )
...
Fixes a couple of test data races. `testing.T` is not concurrency-safe and should not be used in goroutines at all.
2020-09-16 08:48:28 +00:00
Marko
0ed8dba991
lint: enable errcheck ( #5336 )
...
## Description
Enable errcheck linter throughout the codebase
Closes : #5059
2020-09-07 15:03:18 +00:00
Marko
2d167aefcf
ci: freeze golangci action version ( #5196 )
...
## Description
This PR updates golang-ci to latest and stops looking at master for the action.
Closes: #XXX
2020-08-03 07:57:06 +00:00
Anton Kaliaev
95fc7e58ee
rpc/jsonrpc/server: merge WriteRPCResponseHTTP and WriteRPCResponseAr ( #5141 )
...
...rrayHTTP
Closes #5135
Also, wrote a test for WriteRPCResponseHTTPError and used it with correct status codes according to https://www.jsonrpc.org/historical/json-rpc-over-http.html#response-codes
2020-07-21 13:03:02 +00:00
Marko
7e2cc1db5e
linter: (1/2) enable errcheck ( #5064 )
...
## Description
partially cleanup in preparation for errcheck
i ignored a bunch of defer errors in tests but with the update to go 1.14 we can use `t.Cleanup(func() { if err := <>; err != nil {..}}` to cover those errors, I will do this in pr number two of enabling errcheck.
ref #5059
2020-07-01 15:13:11 +00:00
Anton Kaliaev
a14ff5cb30
rpc: refactor lib folder ( #4836 )
...
Closes https://github.com/tendermint/tendermint/issues/3857
Moves `lib/` folder to `jsonrpc/`.
Renames:
**packages**
`rpc` package -> `jsonrpc` package
`rpcclient` package -> `client` package
`rpcserver` package -> `server` package
**structs and interfaces**
```
JSONRPCClient to Client
JSONRPCRequestBatch to RequestBatch
JSONRPCCaller to Caller
```
**functions**
```
StartHTTPServer to Serve
StartHTTPAndTLSServer to ServeTLS
rpc/jsonrpc/client: rename NewURIClient to NewURI
NewJSONRPCClient to New
NewJSONRPCClientWithHTTPClient to NewWithHTTPClient
NewWSClient to NewWS
```
**misc**
- unexpose `ResponseWriterWrapper`
- remove unused http_params.go
2020-05-13 16:40:57 +04:00