github.com/palantir/godel-dep-plugin@v1.1.1-0.20201218041358-274eaa9b1310/cmd/plugininfo.go (about)

     1  // Copyright (c) 2018 Palantir Technologies Inc. All rights reserved.
     2  // Use of this source code is governed by the Apache License, Version 2.0
     3  // that can be found in the LICENSE file.
     4  
     5  package cmd
     6  
     7  import (
     8  	"github.com/nmiyake/archiver"
     9  	"github.com/palantir/godel/framework/pluginapi/v2/pluginapi"
    10  	"github.com/palantir/godel/framework/verifyorder"
    11  )
    12  
    13  var (
    14  	Version    = "unspecified"
    15  	PluginInfo = pluginapi.MustNewPluginInfo(
    16  		"com.palantir.godel-dep-plugin",
    17  		"dep-plugin",
    18  		Version,
    19  		pluginapi.PluginInfoUsesConfigFile(),
    20  		pluginapi.PluginInfoGlobalFlagOptions(
    21  			pluginapi.GlobalFlagOptionsParamDebugFlag("--"+pluginapi.DebugFlagName),
    22  		),
    23  		pluginapi.PluginInfoTaskInfo(
    24  			"dep",
    25  			"Run dep ensure",
    26  			pluginapi.TaskInfoCommand("dep"),
    27  			pluginapi.TaskInfoVerifyOptions(
    28  				pluginapi.VerifyOptionsApplyFalseArgs("--verify"),
    29  				pluginapi.VerifyOptionsOrdering(intPtr(verifyorder.Format+50)),
    30  			),
    31  		),
    32  		pluginapi.PluginInfoTaskInfo(
    33  			"run-dep",
    34  			"Run dep with the provided flags and arguments",
    35  			pluginapi.TaskInfoCommand("run"),
    36  		),
    37  	)
    38  )
    39  
    40  func intPtr(val int) *int {
    41  	_ = archiver.CompressedFormats
    42  	return &val
    43  }