Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add revive to the list of linters. #14391

Merged
merged 1 commit into from
Aug 31, 2022
Merged

Add revive to the list of linters. #14391

merged 1 commit into from
Aug 31, 2022

Conversation

cenkalti
Copy link
Member

@cenkalti cenkalti commented Aug 27, 2022

Part of "Enhance the static-analysis workflow" issue. #14164

The list of issues found and fixed were:

[dev:etcd]{main}% make lint
golangci-lint run
tools/etcd-dump-logs/etcd-dump-log_test.go:47:2: var-naming: don't use underscores in Go names; var decoder_correctoutputformat should be decoderCorrectoutputformat (revive)
        decoder_correctoutputformat := filepath.Join(binDir, "/testdecoder/decoder_correctoutputformat.sh")
        ^
tools/etcd-dump-logs/etcd-dump-log_test.go:48:2: var-naming: don't use underscores in Go names; var decoder_wrongoutputformat should be decoderWrongoutputformat (revive)
        decoder_wrongoutputformat := filepath.Join(binDir, "/testdecoder/decoder_wrongoutputformat.sh")
        ^
tools/etcd-dump-logs/main.go:93:4: var-naming: var confstateJson should be confstateJSON (revive)
                        confstateJson, err := json.Marshal(snapshot.Metadata.ConfState)
                        ^
tools/etcd-dump-logs/main.go:375:4: var-naming: don't use underscores in Go names; var decoder_status should be decoderStatus (revive)
                        decoder_status, decoded_data := parseDecoderOutput(decoderoutput)
                        ^
tools/etcd-dump-logs/main.go:396:6: var-naming: don't use underscores in Go names; var decoder_status should be decoderStatus (revive)
        var decoder_status string
            ^
tools/etcd-dump-logs/main.go:397:6: var-naming: don't use underscores in Go names; var decoded_data should be decodedData (revive)
        var decoded_data string
            ^
contrib/raftexample/httpapi.go:63:3: var-naming: var nodeId should be nodeID (revive)
                nodeId, err := strconv.ParseUint(key[1:], 0, 64)
                ^
contrib/raftexample/httpapi.go:79:3: var-naming: var nodeId should be nodeID (revive)
                nodeId, err := strconv.ParseUint(key[1:], 0, 64)
                ^
contrib/raftexample/httpapi.go:104:6: var-naming: func serveHttpKVAPI should be serveHTTPKVAPI (revive)
func serveHttpKVAPI(kv *kvstore, port int, confChangeC chan<- raftpb.ConfChange, errorC <-chan error) {
     ^
tools/benchmark/cmd/util.go:50:2: var-naming: var leaderId should be leaderID (revive)
        leaderId := uint64(0)
        ^
make: *** [lint] Error 1

Part of "Enhance the static-analysis workflow" issue. etcd-io#14164

Signed-off-by: Cenk Alti <[email protected]>
Copy link
Member

@ahrtr ahrtr left a comment

Choose a reason for hiding this comment

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

LGTM

Thank you @cenkalti

@ahrtr ahrtr merged commit 5707147 into etcd-io:main Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants