vusirikala / go-unstablesortcheck-linter

Go linter to check occurences of `sort.Sort` and `sort.Slice`

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Go Linter

This go linter checks the occurences of sort.Sort and sort.Slice in go code and suggests to replace them with more stable versions sort.Stable and sort.SliceStable.

Example

Run the below command to test the linter on testdata/foo.go file. The linter should detect an occurence of sort.Sort and sort.Slice.

go run ./cmd/unstablesortlint/main.go -- ./testdata/foo.go

About

Go linter to check occurences of `sort.Sort` and `sort.Slice`


Languages

Language:Go 100.0%