diff --git a/.golangci.yml b/.golangci.yml index 1ddc6a338a..d36d67bdb9 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -17,6 +17,9 @@ linters: - goimports - unconvert - nilerr + - forbidigo + - bidichk + - asciicheck issues: exclude-rules: @@ -38,6 +41,10 @@ linters-settings: - exitAfterDefer goimports: local-prefixes: github.com/onflow/cadence + forbidigo: + forbid: + - '^maps.Keys.*(# has indeterminate order\.)?$' + - '^maps.Values.*(# has indeterminate order\.)?$' custom: maprange: path: tools/maprange/maprange.so diff --git a/runtime/cmd/check/main.go b/runtime/cmd/check/main.go index 9f6d2c7821..4566d7e118 100644 --- a/runtime/cmd/check/main.go +++ b/runtime/cmd/check/main.go @@ -91,7 +91,7 @@ func main() { } type benchResult struct { - // N is the the number of iterations + // N is the number of iterations Iterations int `json:"iterations"` // T is the total time taken Time time.Duration `json:"time"` diff --git a/runtime/cmd/parse/main.go b/runtime/cmd/parse/main.go index 29e5a01546..b1afb4f93d 100644 --- a/runtime/cmd/parse/main.go +++ b/runtime/cmd/parse/main.go @@ -50,7 +50,7 @@ func main() { } type benchResult struct { - // N is the the number of iterations + // N is the number of iterations Iterations int `json:"iterations"` // T is the total time taken Time time.Duration `json:"time"` diff --git a/runtime/stdlib/rlp/rlp.go b/runtime/stdlib/rlp/rlp.go index 238bf6c8ed..bbdfc16880 100644 --- a/runtime/stdlib/rlp/rlp.go +++ b/runtime/stdlib/rlp/rlp.go @@ -97,7 +97,7 @@ func ReadSize(inp []byte, startIndex int) (isString bool, dataStartIndex, dataSi var bytesToReadForLen uint // long string mode (55+ long strings) // firstByte minus the end range of short string, returns the number of bytes to read - // for calculating the the len of data. bytesToReadForlen is at least 1 and at most 8. + // for calculating the len of data. bytesToReadForlen is at least 1 and at most 8. if firstByte >= LongStringRangeStart && firstByte <= LongStringRangeEnd { bytesToReadForLen = uint(firstByte - ShortStringRangeEnd) isString = true @@ -105,7 +105,7 @@ func ReadSize(inp []byte, startIndex int) (isString bool, dataStartIndex, dataSi // long list mode // firstByte minus the end range of short list, returns the number of bytes to read - // for calculating the the len of data. bytesToReadForlen is at least 1 and at most 8. + // for calculating the len of data. bytesToReadForlen is at least 1 and at most 8. if firstByte >= LongListRangeStart { bytesToReadForLen = uint(firstByte - ShortListRangeEnd) isString = false