Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 111d252

Browse files
authoredApr 5, 2023
Fix lints (celestiaorg#625)
This touches a large number of files, but I believe it's necessary as part of our tech debt cleanup. There are so many functions littering the codebase where: 1. We have unused parameters and they should have been refactored away, but they weren't 2. We have unused parameters and they should be named according to proper Go conventions (e.g. in interface implementations where a particular function signature is required, but the variable names should either be left out or `_` when unused) 3. We have redundant code (a whole bunch of redundant `if` statements and error checks, for example) 4. We use bad naming conventions for variables, like `copy` or `len` I'm also tired of having the linter fail locally. And if we don't do this, it will all just rot even more. This PR targets `main`, but should be applied across all the backport branches (which will, of course, require some conflict resolution, but I'm fine with doing that). I've left TODOs in some places where changes need to be made in follow-up PRs. Commits are organized by package so that it's hopefully easier to review. If you pick up on formatting changes, please see celestiaorg#604. --- #### PR checklist - [ ] Tests written/updated - [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments
1 parent 6088604 commit 111d252

File tree

114 files changed

+739
-738
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+739
-738
lines changed
 

‎.github/workflows/lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
go.sum
3232
- uses: golangci/golangci-lint-action@v3
3333
with:
34-
version: v1.51
34+
version: latest
3535
args: --timeout 10m
3636
github-token: ${{ secrets.github_token }}
3737
if: env.GIT_DIFF

‎Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ format:
231231

232232
lint:
233233
@echo "--> Running linter"
234-
@go run github.com/golangci/golangci-lint/cmd/golangci-lint run
234+
@go run github.com/golangci/golangci-lint/cmd/golangci-lint@latest run
235235
.PHONY: lint
236236

237237
vulncheck:

0 commit comments

Comments
 (0)
Please sign in to comment.