diff --git a/Gopkg.lock b/Gopkg.lock index 8996771e..7ed922e8 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -111,14 +111,14 @@ revision = "6ef6fc2811e260af0641aae25a45881217b3cf3d" [[projects]] - branch = "master" name = "github.com/palantir/okgo" packages = [ "checker", "okgo", "okgotester" ] - revision = "55643a0dc2ddd7000da31c5945e0de216f107053" + revision = "32725b197ce491268c43f7036aa702bb99dac21c" + version = "v1.0.0" [[projects]] branch = "master" @@ -218,6 +218,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "e003415556bdbc8d18bdb4ff684afb87e4a335f9447098f4b3dee7d2b97e3d03" + inputs-digest = "aad702e1f6f11b13ce7bcadbca64932b3912c8b490f425b1bc98678290d66eee" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index 65dc8da5..7fb12732 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -27,8 +27,8 @@ required = ["golang.org/x/lint"] version = "1.3.0" [[constraint]] - branch = "master" name = "github.com/palantir/okgo" + version = "1.0.0" [[constraint]] branch = "master" diff --git a/integration_test/integration_test.go b/integration_test/integration_test.go index 74fdbb07..b6c82b49 100644 --- a/integration_test/integration_test.go +++ b/integration_test/integration_test.go @@ -25,7 +25,7 @@ import ( ) const ( - okgoPluginLocator = "com.palantir.okgo:check-plugin:1.0.0-rc4" + okgoPluginLocator = "com.palantir.okgo:check-plugin:1.0.0" okgoPluginResolver = "https://palantir.bintray.com/releases/{{GroupPath}}/{{Product}}/{{Version}}/{{Product}}-{{Version}}-{{OS}}-{{Arch}}.tgz" ) @@ -123,22 +123,13 @@ checks: WantOutput: `Upgraded configuration for check-plugin.yml `, WantFiles: map[string]string{ - "godel/config/check-plugin.yml": `release-tag: "" -checks: + "godel/config/check-plugin.yml": `checks: golint: - skip: false - priority: null - config: {} filters: - - type: "" - value: should have comment or be unexported + - value: should have comment or be unexported exclude: names: - .*.pb.go - paths: [] -exclude: - names: [] - paths: [] `, }, }, diff --git a/vendor/github.com/palantir/okgo/.circleci/config.yml b/vendor/github.com/palantir/okgo/.circleci/config.yml index c9d44288..920b7568 100644 --- a/vendor/github.com/palantir/okgo/.circleci/config.yml +++ b/vendor/github.com/palantir/okgo/.circleci/config.yml @@ -4,7 +4,7 @@ working_dir: &working_dir darwin-linux-no-cgo: &darwin-linux-no-cgo <<: *working_dir docker: - - image: nmiyake/go:go-darwin-linux-no-cgo-1.10-t126 + - image: nmiyake/go:go-darwin-linux-no-cgo-1.10.1-t127 environment: CGO_ENABLED: 0 diff --git a/vendor/github.com/palantir/okgo/Gopkg.lock b/vendor/github.com/palantir/okgo/Gopkg.lock index 073a3481..eb31a6a6 100644 --- a/vendor/github.com/palantir/okgo/Gopkg.lock +++ b/vendor/github.com/palantir/okgo/Gopkg.lock @@ -10,7 +10,14 @@ [[projects]] branch = "master" name = "github.com/dsnet/compress" - packages = [".","bzip2","bzip2/internal/sais","internal","internal/errors","internal/prefix"] + packages = [ + ".", + "bzip2", + "bzip2/internal/sais", + "internal", + "internal/errors", + "internal/prefix" + ] revision = "cc9eb1d7ad760af14e8f918698f745e80377af4f" [[projects]] @@ -52,7 +59,11 @@ [[projects]] branch = "develop" name = "github.com/nmiyake/pkg" - packages = ["dirs","errorstringer","gofiles"] + packages = [ + "dirs", + "errorstringer", + "gofiles" + ] revision = "b64318170fdef93b4462420e0badef8050dbb7ec" [[projects]] @@ -70,14 +81,45 @@ [[projects]] branch = "master" name = "github.com/palantir/godel" - packages = ["framework/artifactresolver","framework/builtintasks","framework/builtintasks/checkpath","framework/builtintasks/githooks","framework/builtintasks/githubwiki","framework/builtintasks/idea","framework/builtintasks/installupdate","framework/builtintasks/installupdate/layout","framework/builtintasks/packages","framework/godel","framework/godel/config","framework/godel/config/internal/v0","framework/godellauncher","framework/godellauncher/defaulttasks","framework/internal/pathsinternal","framework/internal/pluginsinternal","framework/pluginapi","framework/pluginapi/v2/pluginapi","framework/pluginapitester","framework/plugins","framework/verifyorder","godelgetter","pkg/osarch","pkg/products","pkg/versionedconfig"] + packages = [ + "framework/artifactresolver", + "framework/builtintasks", + "framework/builtintasks/checkpath", + "framework/builtintasks/githooks", + "framework/builtintasks/githubwiki", + "framework/builtintasks/idea", + "framework/builtintasks/installupdate", + "framework/builtintasks/installupdate/layout", + "framework/builtintasks/packages", + "framework/godel", + "framework/godel/config", + "framework/godel/config/internal/v0", + "framework/godellauncher", + "framework/godellauncher/defaulttasks", + "framework/internal/pathsinternal", + "framework/internal/pluginsinternal", + "framework/pluginapi", + "framework/pluginapi/v2/pluginapi", + "framework/pluginapitester", + "framework/plugins", + "framework/verifyorder", + "godelgetter", + "pkg/osarch", + "pkg/products", + "pkg/versionedconfig" + ] revision = "6ef6fc2811e260af0641aae25a45881217b3cf3d" [[projects]] branch = "master" name = "github.com/palantir/pkg" - packages = ["cobracli","matcher","pkgpath","specdir"] - revision = "b59de130c1302a3c591efcfb0fd575727f53d0d2" + packages = [ + "cobracli", + "matcher", + "pkgpath", + "specdir" + ] + revision = "23395ebeee5df1083443a6261e5f674a76af91b6" [[projects]] name = "github.com/pkg/errors" @@ -94,8 +136,8 @@ [[projects]] name = "github.com/spf13/cobra" packages = ["."] - revision = "7b2c5ac9fc04fc5efafb60700713d4fa609b777b" - version = "v0.0.1" + revision = "a1f051bc3eba734da4772d60e2d677f47cf93ef4" + version = "v0.0.2" [[projects]] name = "github.com/spf13/pflag" @@ -105,7 +147,10 @@ [[projects]] name = "github.com/stretchr/testify" - packages = ["assert","require"] + packages = [ + "assert", + "require" + ] revision = "12b6f73e6084dad08a7c6e575284b177ecafbc71" version = "v1.2.1" @@ -117,7 +162,12 @@ [[projects]] name = "github.com/ulikunitz/xz" - packages = [".","internal/hash","internal/xlog","lzma"] + packages = [ + ".", + "internal/hash", + "internal/xlog", + "lzma" + ] revision = "0c6b41e72360850ca4f98dc341fd999726ea007f" version = "v0.5.4" @@ -142,6 +192,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "d71ef4da983cb027cd22c4b3e4f4fdb785347daaa954bc89370aca6096f24a27" + inputs-digest = "89132ba92be34a29996c1fb7333a5d306f749dd1ea86eff6027f25b6c9c9b582" solver-name = "gps-cdcl" solver-version = 1 diff --git a/vendor/github.com/palantir/okgo/Gopkg.toml b/vendor/github.com/palantir/okgo/Gopkg.toml index 18350cfc..c262d08a 100644 --- a/vendor/github.com/palantir/okgo/Gopkg.toml +++ b/vendor/github.com/palantir/okgo/Gopkg.toml @@ -43,7 +43,7 @@ [[constraint]] name = "github.com/spf13/cobra" - version = "0.0.1" + version = "0.0.2" [[constraint]] name = "github.com/spf13/pflag" diff --git a/vendor/github.com/palantir/okgo/README.md b/vendor/github.com/palantir/okgo/README.md index bcd8f2b2..8a5d7a0c 100644 --- a/vendor/github.com/palantir/okgo/README.md +++ b/vendor/github.com/palantir/okgo/README.md @@ -6,37 +6,19 @@ Plugin Tasks ------------ okgo provides the following tasks: -* `check [checks]`: runs the specified checks (which must be loaded as assets). If no checks are specified, runs all - checks. -* `run-check [check] [flags] [args]`: runs the specified check "directly" using the specified flags and args. Most check - assets wrap an underlying check executable and the arguments that are provided to that underlying executable are - determined based on the plugin configuration. "run-check" allows the underlying check to be called directly. For - example, `errcheck-asset` wraps the [errcheck](https://github.com/kisielk/errcheck) check. The task `check errcheck` - invokes `errcheck` using the configuration specified in `check.yml` and the project packages as determined by gödel - and its configuration. However, one may want to run the underlying `errcheck` check directly -- for example, to run it - with a specific flag or on a specific input. The `run-check` task allows this. For example, the task - `run-check errcheck -- -verbose .` runs the errcheck check with the arguments "-verbose ." (the `--` after `errcheck` - is necessary to signal that all of the arguments that follow should be interpreted literally rather than as flags). +* `check [checks]`: runs the specified checks (which must be loaded as assets). If no checks are specified, runs all checks. +* `run-check [check] [flags] [args]`: runs the specified check "directly" using the specified flags and args. Most check assets wrap an underlying check executable and the arguments that are provided to that underlying executable are determined based on the plugin configuration. "run-check" allows the underlying check to be called directly. For example, `errcheck-asset` wraps the [errcheck](https://github.com/kisielk/errcheck) check. The task `check errcheck` invokes `errcheck` using the configuration specified in `check.yml` and the project packages as determined by gödel and its configuration. However, one may want to run the underlying `errcheck` check directly -- for example, to run it with a specific flag or on a specific input. The `run-check` task allows this. For example, the task `run-check errcheck -- -verbose .` runs the errcheck check with the arguments "-verbose ." (the `--` after `errcheck` is necessary to signal that all of the arguments that follow should be interpreted literally rather than as flags). Assets ------ okgo assets are executables that run specific checks. Assets must provide the following commands: -* `type`: prints the name of the check as a JSON string (for example, `"errcheck"`). The value of `type` must be unique - among all loaded assets. -* `priority`: prints the priority of the check as a JSON integer (for example, `0`). This value is used to determine the - order in which checks are run. Checks with lower priority values are run first. If multiple checks have the same - priority, they are run in alphabetic order of `type`. -* `verify-config --config-yml [configuration YAML]`: exits with a non-0 exit code if the provided configuration YAML is - not valid for the check. -* `check [--project-dir [project directory]] --config-yml [configuration YAML] [packages]`: runs the check on the - specified packages using the provided configuration. Packages are specified relative to the working directory. Writes - the JSON representation of `github.com/palantir/okgo/okgo.Issue` to `stdout` for each issue encountered, one per line. - These issues should be the only output written to `stdout`. +* `type`: prints the name of the check as a JSON string (for example, `"errcheck"`). The value of `type` must be unique among all loaded assets. +* `priority`: prints the priority of the check as a JSON integer (for example, `0`). This value is used to determine the order in which checks are run. Checks with lower priority values are run first. If multiple checks have the same priority, they are run in alphabetic order of `type`. +* `verify-config --config-yml [configuration YAML]`: exits with a non-0 exit code if the provided configuration YAML is not valid for the check. +* `check [--project-dir [project directory]] --config-yml [configuration YAML] [packages]`: runs the check on the specified packages using the provided configuration. Packages are specified relative to the working directory. Writes the JSON representation of `github.com/palantir/okgo/okgo.Issue` to `stdout` for each issue encountered, one per line. These issues should be the only output written to `stdout`. * `run-check-cmd [flags] [args]`: runs the underlying check directly using the provided flags and arguments. Writing an asset ---------------- -okgo provides helper APIs to facilitate writing new assets. More detailed instructions for writing assets are -forthcoming. In the meantime, the most effective way to write an asset is to examine the implementation of an existing -asset. +okgo provides helper APIs to facilitate writing new assets. More detailed instructions for writing assets are forthcoming. In the meantime, the most effective way to write an asset is to examine the implementation of an existing asset. diff --git a/vendor/github.com/palantir/okgo/cmd/check.go b/vendor/github.com/palantir/okgo/cmd/check.go index ad395ea9..9ed30b73 100644 --- a/vendor/github.com/palantir/okgo/cmd/check.go +++ b/vendor/github.com/palantir/okgo/cmd/check.go @@ -118,5 +118,5 @@ func toCheckerTypes(in []string, factory okgo.CheckerFactory) ([]okgo.CheckerTyp func init() { checkCmd.Flags().BoolVar(¶llelFlagVal, "parallel", true, "run checks in parallel") - RootCmd.AddCommand(checkCmd) + rootCmd.AddCommand(checkCmd) } diff --git a/vendor/github.com/palantir/okgo/cmd/plugininfo.go b/vendor/github.com/palantir/okgo/cmd/plugininfo.go index a1fb92d8..f8e22906 100644 --- a/vendor/github.com/palantir/okgo/cmd/plugininfo.go +++ b/vendor/github.com/palantir/okgo/cmd/plugininfo.go @@ -17,37 +17,39 @@ package cmd import ( "github.com/palantir/godel/framework/pluginapi/v2/pluginapi" "github.com/palantir/godel/framework/verifyorder" - "github.com/palantir/pkg/cobracli" ) -var PluginInfo = pluginapi.MustNewPluginInfo( - "com.palantir.okgo", - "check-plugin", - cobracli.Version, - pluginapi.PluginInfoUsesConfigFile(), - pluginapi.PluginInfoGlobalFlagOptions( - pluginapi.GlobalFlagOptionsParamDebugFlag("--"+pluginapi.DebugFlagName), - pluginapi.GlobalFlagOptionsParamProjectDirFlag("--"+pluginapi.ProjectDirFlagName), - pluginapi.GlobalFlagOptionsParamGodelConfigFlag("--"+pluginapi.GodelConfigFlagName), - pluginapi.GlobalFlagOptionsParamConfigFlag("--"+pluginapi.ConfigFlagName), - ), - pluginapi.PluginInfoTaskInfo( - checkCmd.Name(), - checkCmd.Short, - pluginapi.TaskInfoCommand(checkCmd.Name()), - pluginapi.TaskInfoVerifyOptions( - pluginapi.VerifyOptionsOrdering(intPtr(verifyorder.Check)), +var ( + Version = "unspecified" + PluginInfo = pluginapi.MustNewPluginInfo( + "com.palantir.okgo", + "check-plugin", + Version, + pluginapi.PluginInfoUsesConfigFile(), + pluginapi.PluginInfoGlobalFlagOptions( + pluginapi.GlobalFlagOptionsParamDebugFlag("--"+pluginapi.DebugFlagName), + pluginapi.GlobalFlagOptionsParamProjectDirFlag("--"+pluginapi.ProjectDirFlagName), + pluginapi.GlobalFlagOptionsParamGodelConfigFlag("--"+pluginapi.GodelConfigFlagName), + pluginapi.GlobalFlagOptionsParamConfigFlag("--"+pluginapi.ConfigFlagName), ), - ), - pluginapi.PluginInfoTaskInfo( - runCheckCmd.Name(), - runCheckCmd.Short, - pluginapi.TaskInfoCommand(runCheckCmd.Name()), - ), - pluginapi.PluginInfoUpgradeConfigTaskInfo( - pluginapi.UpgradeConfigTaskInfoCommand("upgrade-config"), - pluginapi.LegacyConfigFile("check.yml"), - ), + pluginapi.PluginInfoTaskInfo( + checkCmd.Name(), + checkCmd.Short, + pluginapi.TaskInfoCommand(checkCmd.Name()), + pluginapi.TaskInfoVerifyOptions( + pluginapi.VerifyOptionsOrdering(intPtr(verifyorder.Check)), + ), + ), + pluginapi.PluginInfoTaskInfo( + runCheckCmd.Name(), + runCheckCmd.Short, + pluginapi.TaskInfoCommand(runCheckCmd.Name()), + ), + pluginapi.PluginInfoUpgradeConfigTaskInfo( + pluginapi.UpgradeConfigTaskInfoCommand("upgrade-config"), + pluginapi.LegacyConfigFile("check.yml"), + ), + ) ) func intPtr(val int) *int { diff --git a/vendor/github.com/palantir/okgo/cmd/root.go b/vendor/github.com/palantir/okgo/cmd/root.go index ef133f1a..28419bf4 100644 --- a/vendor/github.com/palantir/okgo/cmd/root.go +++ b/vendor/github.com/palantir/okgo/cmd/root.go @@ -19,6 +19,7 @@ import ( godelconfig "github.com/palantir/godel/framework/godel/config" "github.com/palantir/godel/framework/pluginapi" + "github.com/palantir/pkg/cobracli" "github.com/palantir/pkg/matcher" "github.com/pkg/errors" "github.com/spf13/cobra" @@ -32,6 +33,7 @@ import ( ) var ( + debugFlagVal bool projectDirFlagVal string okgoConfigFileFlagVal string godelConfigFileFlagVal string @@ -40,12 +42,16 @@ var ( cliCheckerFactory okgo.CheckerFactory ) -var RootCmd = &cobra.Command{ +var rootCmd = &cobra.Command{ Use: "okgo", } +func Execute() int { + return cobracli.ExecuteWithDebugVarAndDefaultParams(rootCmd, &debugFlagVal) +} + func InitAssetCmds(args []string) error { - if _, _, err := RootCmd.Traverse(args); err != nil && err != pflag.ErrHelp { + if _, _, err := rootCmd.Traverse(args); err != nil && err != pflag.ErrHelp { return errors.Wrapf(err, "failed to parse arguments") } @@ -66,10 +72,11 @@ func InitAssetCmds(args []string) error { } func init() { - pluginapi.AddProjectDirPFlagPtr(RootCmd.PersistentFlags(), &projectDirFlagVal) - pluginapi.AddConfigPFlagPtr(RootCmd.PersistentFlags(), &okgoConfigFileFlagVal) - pluginapi.AddGodelConfigPFlagPtr(RootCmd.PersistentFlags(), &godelConfigFileFlagVal) - pluginapi.AddAssetsPFlagPtr(RootCmd.PersistentFlags(), &assetsFlagVal) + pluginapi.AddDebugPFlagPtr(rootCmd.PersistentFlags(), &debugFlagVal) + pluginapi.AddProjectDirPFlagPtr(rootCmd.PersistentFlags(), &projectDirFlagVal) + pluginapi.AddConfigPFlagPtr(rootCmd.PersistentFlags(), &okgoConfigFileFlagVal) + pluginapi.AddGodelConfigPFlagPtr(rootCmd.PersistentFlags(), &godelConfigFileFlagVal) + pluginapi.AddAssetsPFlagPtr(rootCmd.PersistentFlags(), &assetsFlagVal) } func okgoProjectParamFromFlags() (okgo.ProjectParam, matcher.Matcher, error) { diff --git a/vendor/github.com/palantir/okgo/cmd/run.go b/vendor/github.com/palantir/okgo/cmd/run.go index d003eb14..7f48ef4a 100644 --- a/vendor/github.com/palantir/okgo/cmd/run.go +++ b/vendor/github.com/palantir/okgo/cmd/run.go @@ -29,7 +29,7 @@ var ( ) func init() { - RootCmd.AddCommand(runCheckCmd) + rootCmd.AddCommand(runCheckCmd) } func addRunSubcommands() { diff --git a/vendor/github.com/palantir/okgo/cmd/upgradeconfig.go b/vendor/github.com/palantir/okgo/cmd/upgradeconfig.go index 59fab85a..5f6054e2 100644 --- a/vendor/github.com/palantir/okgo/cmd/upgradeconfig.go +++ b/vendor/github.com/palantir/okgo/cmd/upgradeconfig.go @@ -25,5 +25,5 @@ var upgradeConfigCmd = pluginapi.CobraUpgradeConfigCmd(func(cfgBytes []byte) ([] }) func init() { - RootCmd.AddCommand(upgradeConfigCmd) + rootCmd.AddCommand(upgradeConfigCmd) } diff --git a/vendor/github.com/palantir/okgo/godel/config/dist.yml b/vendor/github.com/palantir/okgo/godel/config/dist.yml index cf1484a0..f322c6a6 100644 --- a/vendor/github.com/palantir/okgo/godel/config/dist.yml +++ b/vendor/github.com/palantir/okgo/godel/config/dist.yml @@ -9,4 +9,5 @@ products: arch: amd64 - os: linux arch: amd64 + version-var: github.com/palantir/okgo/cmd.Version group-id: com.palantir.okgo diff --git a/vendor/github.com/palantir/okgo/integration_test/integration_test.go b/vendor/github.com/palantir/okgo/integration_test/integration_test.go index 0fd971a0..105fbb8e 100644 --- a/vendor/github.com/palantir/okgo/integration_test/integration_test.go +++ b/vendor/github.com/palantir/okgo/integration_test/integration_test.go @@ -46,7 +46,6 @@ exclude: WantOutput: "Upgraded configuration for check-plugin.yml\n", WantFiles: map[string]string{ "godel/config/check-plugin.yml": `release-tag: go1.7 -checks: {} exclude: names: - m?cks diff --git a/vendor/github.com/palantir/okgo/main.go b/vendor/github.com/palantir/okgo/main.go index f742b2e2..f991c79e 100644 --- a/vendor/github.com/palantir/okgo/main.go +++ b/vendor/github.com/palantir/okgo/main.go @@ -19,23 +19,18 @@ import ( "os" "github.com/palantir/godel/framework/pluginapi/v2/pluginapi" - "github.com/palantir/pkg/cobracli" "github.com/palantir/okgo/cmd" ) -var debugFlagVal bool - func main() { if ok := pluginapi.InfoCmd(os.Args, os.Stdout, cmd.PluginInfo); ok { return } // initialize commands that require assets - pluginapi.AddDebugPFlagPtr(cmd.RootCmd.PersistentFlags(), &debugFlagVal) if err := cmd.InitAssetCmds(os.Args[1:]); err != nil { fmt.Println(err) os.Exit(1) } - - os.Exit(cobracli.ExecuteWithDefaultParamsWithVersion(cmd.RootCmd, &debugFlagVal, "")) + os.Exit(cmd.Execute()) } diff --git a/vendor/github.com/palantir/okgo/okgo/check/check.go b/vendor/github.com/palantir/okgo/okgo/check/check.go index 4b40edd0..794a560a 100644 --- a/vendor/github.com/palantir/okgo/okgo/check/check.go +++ b/vendor/github.com/palantir/okgo/okgo/check/check.go @@ -186,26 +186,22 @@ func runCheck(checkerType okgo.CheckerType, outputPrefix string, checkerParam ok line := scanner.Text() issue := okgo.NewIssueFromJSON(line) - if issue.Path != "" { - // legitimate issue: determine whether or not it should be filtered out - + if issue.Path != "" && checkerParam.Exclude != nil && checkerParam.Exclude.Match(issue.Path) { // if path matches exclude, skip - if checkerParam.Exclude != nil && checkerParam.Exclude.Match(issue.Path) { - continue - } + continue + } - // if path matches filter, skip - filterOut := false - for _, filter := range checkerParam.Filters { - if filter.Filter(issue) { - filterOut = true - break - } - } - if filterOut { - continue + // if issue matches filter, skip + filterOut := false + for _, filter := range checkerParam.Filters { + if filter.Filter(issue) { + filterOut = true + break } } + if filterOut { + continue + } fmt.Fprintf(stdout, "%s%s\n", outputPrefix, strings.Replace(issue.String(), "\n", "\n"+outputPrefix, -1)) result.producedOutput = true } diff --git a/vendor/github.com/palantir/okgo/okgo/config/internal/v0/config.go b/vendor/github.com/palantir/okgo/okgo/config/internal/v0/config.go index ad97a9db..ffcb2c02 100644 --- a/vendor/github.com/palantir/okgo/okgo/config/internal/v0/config.go +++ b/vendor/github.com/palantir/okgo/okgo/config/internal/v0/config.go @@ -32,41 +32,41 @@ type ProjectConfig struct { // and the codebase being checked contains build tags for the newer Go version, this value should be explicitly // set. For example, if the check tool was compiled using Go 1.8 but the codebase being checked uses Go 1.7 and // contains files that use the "// +build go1.8" build tag, then this should be set to "go1.7". - ReleaseTag string `yaml:"release-tag"` + ReleaseTag string `yaml:"release-tag,omitempty"` // Checks specifies the configuration used by the checks. The key is the name of the check and the value is the // custom configuration for that check. - Checks map[okgo.CheckerType]CheckerConfig `yaml:"checks"` + Checks map[okgo.CheckerType]CheckerConfig `yaml:"checks,omitempty"` // Exclude specifies the paths that should be excluded from all checks. - Exclude matcher.NamesPathsCfg `yaml:"exclude"` + Exclude matcher.NamesPathsCfg `yaml:"exclude,omitempty"` } type CheckerConfig struct { // Skip indicates whether or not the check should be skipped entirely. - Skip bool `yaml:"skip"` + Skip bool `yaml:"skip,omitempty"` // Priority is the priority for this check. If the value is non-nil, this value is used instead of the priority // provided by the checker. - Priority *int `yaml:"priority"` + Priority *int `yaml:"priority,omitempty"` // Config is the YAML configuration content for the Checker. - Config yaml.MapSlice `yaml:"config"` + Config yaml.MapSlice `yaml:"config,omitempty"` // Filters specifies the filter definitions. Raw output lines that match the filter are excluded from // processing. - Filters []FilterConfig `yaml:"filters"` + Filters []FilterConfig `yaml:"filters,omitempty"` // Exclude specifies the paths that should be excluded from this check. - Exclude matcher.NamesPathsCfg `yaml:"exclude"` + Exclude matcher.NamesPathsCfg `yaml:"exclude,omitempty"` } type FilterConfig struct { // Type specifies the type of the filter. - Type FilterType `yaml:"type"` + Type FilterType `yaml:"type,omitempty"` // Value is the value of the filter. - Value string `yaml:"value"` + Value string `yaml:"value,omitempty"` } type FilterType string diff --git a/vendor/github.com/palantir/okgo/okgotester/okgotester.go b/vendor/github.com/palantir/okgo/okgotester/okgotester.go index f2cafaf9..4a2a4ea4 100644 --- a/vendor/github.com/palantir/okgo/okgotester/okgotester.go +++ b/vendor/github.com/palantir/okgo/okgotester/okgotester.go @@ -104,9 +104,9 @@ func RunAssetCheckTest(t *testing.T, projectDir, false, outputBuf) defer runPluginCleanup() if tc.WantError { - require.EqualError(t, err, "", "Case %d: %s", i, tc.Name) + require.EqualError(t, err, "", "Case %d: %s\nOutput: %s", i, tc.Name, outputBuf.String()) } else { - require.NoError(t, err, "Case %d: %s", i, tc.Name) + require.NoError(t, err, "Case %d: %s\nOutput: %s", i, tc.Name, outputBuf.String()) } assert.Equal(t, tc.WantOutput, outputBuf.String(), "Case %d: %s", i, tc.Name) }()