2022-07-30 02:21:03 +00:00
|
|
|
# explicitreturn
|
|
|
|
A Go linter to enforce explicit return values
|
2022-08-03 00:39:44 +00:00
|
|
|
|
|
|
|
# If you want this linter as a plugin
|
|
|
|
1. Run `make plugin` in the root directory
|
|
|
|
2. Put the resulting `explicitreturn.so` wherever you would like to use it
|
|
|
|
3. Update your project's `.golangci.yml` file with something like this:
|
|
|
|
```yaml
|
|
|
|
linters-settings:
|
|
|
|
custom:
|
|
|
|
explicitreturn:
|
|
|
|
path: path/to/explicitreturn.so
|
|
|
|
description: Enforces explicit return statements
|
|
|
|
original-url: tildegit.org/indigo/explicitreturn
|
|
|
|
```
|
|
|
|
|
|
|
|
# If the plugin gives an error about versions when it should be linting
|
|
|
|
Odds are you built it with a different version of golangci-lint than your
|
|
|
|
project is using. Make sure the version in go.mod in this project
|
|
|
|
matches the version that your project is using, then do the steps above
|