https://github.com/matrixorigin/linter
Go linters developed by MatrixOrigin
https://github.com/matrixorigin/linter
Last synced: 8 months ago
JSON representation
Go linters developed by MatrixOrigin
- Host: GitHub
- URL: https://github.com/matrixorigin/linter
- Owner: matrixorigin
- License: apache-2.0
- Created: 2022-04-09T05:43:45.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2025-05-20T05:57:36.000Z (about 1 year ago)
- Last Synced: 2025-06-03T00:16:05.109Z (about 1 year ago)
- Language: Go
- Size: 61.5 KB
- Stars: 2
- Watchers: 14
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# MatrixOrigin Linter
This repo contains custom linters developed by MatrixOrigin.
## Installation
```
go install github.com/matrixorigin/linter/cmd/molint@latest
```
## Usage
```
cd matrixone
go vet -vettool=$(which molint) ./...
```
## Linters
### checkrecover
As required by our [error handling rules](https://github.com/matrixorigin/matrixone/blob/main/pkg/common/moerr/error_handling.md),
"You should not recover any panics unless it is at a few well defined places".
This linter helps to enforce that.
It will fail when checking the frontend folder as recover() calls there are not currently marked as approved.
### pkgblocklist
Block unwanted packages from importing.
### checklog
Check the usage of `log` package and `fmt.Print*` api to ensure it is only used by pre-approved methods and functions and unittest.