This repository contains mattermost-specific go-vet rules that are used to maintain code consistency in mattermost-server
.
- equalLenAsserts - check for (require/assert).Equal(t, X, len(Y))
- inconsistentReceiverName - check for inconsistent receiver names in the methods of a struct
- license - check the license header
- openApiSync - check for inconsistencies between OpenAPI spec and the source code
- structuredLogging - check invalid usage of logging (must use structured logging)
- tFatal - check invalid usage of t.Fatal assertions (instead of testify methods)
- apiAuditLogs - check that audit records are properly created in the API layer
- rawSql - check invalid usage of raw SQL queries instead of using the squirrel lib
- emptyStrCmp - check for idiomatic empty string comparisons
- pointerToSlice - check for usage of pointer to slice in function definitions
- mutexLock - check for cases where a mutex is left locked before returning