From 212b1b91e362ea0b0e441c9b53ce31e81405c240 Mon Sep 17 00:00:00 2001 From: Kyoichiro Yamada Date: Sun, 26 Nov 2017 19:02:12 +0900 Subject: [PATCH] take a environment variable as a config filename --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 8946e83a..3de9534f 100644 --- a/main.go +++ b/main.go @@ -26,7 +26,7 @@ var ( ) func setupFlags(app *kingpin.Application) { - app.Flag("config", "Load JSON configuration from file.").Action(loadConfig).String() + app.Flag("config", "Load JSON configuration from file.").Envar("GOMETALINTER_CONFIG").Action(loadConfig).String() app.Flag("disable", "Disable previously enabled linters.").PlaceHolder("LINTER").Short('D').Action(disableAction).Strings() app.Flag("enable", "Enable previously disabled linters.").PlaceHolder("LINTER").Short('E').Action(enableAction).Strings() app.Flag("linter", "Define a linter.").PlaceHolder("NAME:COMMAND:PATTERN").Action(cliLinterOverrides).StringMap()