A Go linter to enforce explicit return values
Go to file
indigo 2c550df549 Bundle up for use as a plugin 2022-08-03 00:39:44 +00:00
cmd/explicitreturn Reorganize and get tests working 2022-08-02 22:09:15 +00:00
pkg/analyzer Bundle up for use as a plugin 2022-08-03 00:39:44 +00:00
plugin Bundle up for use as a plugin 2022-08-03 00:39:44 +00:00
.golangci.yml Bundle up for use as a plugin 2022-08-03 00:39:44 +00:00
LICENSE.md Initial commit 2022-07-30 02:21:03 +00:00
Makefile Bundle up for use as a plugin 2022-08-03 00:39:44 +00:00
README.md Bundle up for use as a plugin 2022-08-03 00:39:44 +00:00
go.mod Bundle up for use as a plugin 2022-08-03 00:39:44 +00:00
go.sum Bundle up for use as a plugin 2022-08-03 00:39:44 +00:00
golangci.go Bundle up for use as a plugin 2022-08-03 00:39:44 +00:00

README.md

explicitreturn

A Go linter to enforce explicit return values

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:
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