Skip to content

Replace deprecated golint with revive#10

Merged
michaeldiamant merged 1 commit into
mainfrom
linter
Aug 16, 2022
Merged

Replace deprecated golint with revive#10
michaeldiamant merged 1 commit into
mainfrom
linter

Conversation

@michaeldiamant
Copy link
Copy Markdown
Contributor

Addresses golint deprecation warning by replacing with revive like algorand/go-algorand#4418.

Output on main:

❯ docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.41.0 golangci-lint run
level=warning msg="[runner] The linter 'golint' is deprecated (since v1.41.0) due to: The repository of the linter has been archived by the owner.  Replaced by revive."

Output after configuring revive:

❯ docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.41.0 golangci-lint run
abi/encode_test.go:1196:22: var-declaration: should drop = nil from declaration of var nilPt; it is the zero value (revive)
	var nilPt *uint64 = nil
	                    ^
abi/encode.go:282:18: var-declaration: should drop = 0 from declaration of var res; it is the zero value (revive)
	var res uint8 = 0

For the PR's scope, I didn't closely investigate tooling configuration. The intent is to avoid extending usage of deprecated tooling.

@michaeldiamant michaeldiamant marked this pull request as ready for review August 16, 2022 19:24
Copy link
Copy Markdown
Contributor

@jasonpaulos jasonpaulos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for propagating this change. It looks good

@michaeldiamant michaeldiamant merged commit 26f7170 into main Aug 16, 2022
@michaeldiamant michaeldiamant deleted the linter branch August 16, 2022 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants