Skip to content

Commit 28da29f

Browse files
committed
fix: lint
1 parent 651734b commit 28da29f

File tree

7 files changed

+17
-16
lines changed

7 files changed

+17
-16
lines changed

cmd/executor.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func setupEnvVars(env *cli.Environment) {
7070
env.AddVarWithDefault("log_level", "set logging level (options: debug, notice, info, warn, error)", "info")
7171
}
7272

73-
func (e *Executor) commandPreRun(ctx context.Context) error {
73+
func (e *Executor) commandPreRun(ctx context.Context) error { //nolint:gocyclo
7474
var (
7575
loadProjectOptions LoadProjectOptions
7676
loadAppsMode config.LoadMode
@@ -201,14 +201,14 @@ func buildAppsLoadOptions(cmd *cobra.Command, cmdArgs []string) (*config.LoadApp
201201
return nil, err
202202
}
203203

204-
var targets []string
205-
var skips []string
204+
var targets, skips []string
206205

207206
if cmd.Flags().Lookup("target-apps") != nil {
208207
vals, err := cmd.Flags().GetStringSlice("target-apps")
209208
if err != nil {
210209
return nil, err
211210
}
211+
212212
targets = append(targets, vals...)
213213
}
214214

@@ -217,6 +217,7 @@ func buildAppsLoadOptions(cmd *cobra.Command, cmdArgs []string) (*config.LoadApp
217217
if err != nil {
218218
return nil, err
219219
}
220+
220221
targets = append(targets, vals...)
221222
}
222223

@@ -225,6 +226,7 @@ func buildAppsLoadOptions(cmd *cobra.Command, cmdArgs []string) (*config.LoadApp
225226
if err != nil {
226227
return nil, err
227228
}
229+
228230
skips = append(skips, vals...)
229231
}
230232

@@ -233,6 +235,7 @@ func buildAppsLoadOptions(cmd *cobra.Command, cmdArgs []string) (*config.LoadApp
233235
if err != nil {
234236
return nil, err
235237
}
238+
236239
skips = append(skips, vals...)
237240
}
238241

internal/jsonschemaform/prompt.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ func addLevelPrefix(level int, msg string) string {
565565
return fmt.Sprintf("%s %s", strings.Repeat("#", level+1), msg)
566566
}
567567

568-
func (n *Node) process(sch *jsonschema.Schema) (interface{}, error) { //nolint: gocyclo
568+
func (n *Node) process(sch *jsonschema.Schema) (interface{}, error) { //nolint:gocyclo
569569
sch = schema(sch)
570570

571571
typ := getSchemaType(sch)

pkg/actions/apps_add.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ func validateAppAddDir(cfg *config.Project) func(val interface{}) error {
152152
}
153153
}
154154

155-
func (m *AppManager) promptAddBasic(opts *AppAddOptions) error { //nolint: gocyclo
155+
func (m *AppManager) promptAddBasic(opts *AppAddOptions) error { //nolint:gocyclo
156156
var qs []*survey.Question
157157

158158
// 1st pass - get app name and type.
@@ -542,7 +542,7 @@ func (m *AppManager) promptAddStatic(opts *AppAddOptions) (*staticAppInfo, error
542542
}, nil
543543
}
544544

545-
func (m *AppManager) promptAddService(opts *AppAddOptions) (*serviceAppInfo, error) { //nolint: unparam
545+
func (m *AppManager) promptAddService(opts *AppAddOptions) (*serviceAppInfo, error) { //nolint:unparam
546546
return &serviceAppInfo{
547547
App: config.ServiceApp{
548548
BasicApp: *m.createAddedBasicApp(opts, config.AppTypeService),
@@ -556,7 +556,7 @@ func (m *AppManager) promptAddService(opts *AppAddOptions) (*serviceAppInfo, err
556556
}, nil
557557
}
558558

559-
func (m *AppManager) promptAddFunction(opts *AppAddOptions) (*functionAppInfo, error) { //nolint: unparam
559+
func (m *AppManager) promptAddFunction(opts *AppAddOptions) (*functionAppInfo, error) { //nolint:unparam
560560
var qs []*survey.Question
561561

562562
if opts.FunctionRuntime == "" {

pkg/actions/deploy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ func computeDomainsInfo(cfg *config.Project, state *statefile.StateData) []*apiv
659659
return ret
660660
}
661661

662-
func (d *Deploy) planAndApply(ctx context.Context, verify bool, state *statefile.StateData, acquiredLocks map[string]string, checkLocks bool) (*planAndApplyResults, error) { //nolint: gocyclo
662+
func (d *Deploy) planAndApply(ctx context.Context, verify bool, state *statefile.StateData, acquiredLocks map[string]string, checkLocks bool) (*planAndApplyResults, error) { //nolint:gocyclo
663663
var domains []*apiv1.DomainInfo
664664

665665
ret := &planAndApplyResults{

pkg/actions/init.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ import (
2626
"google.golang.org/grpc/codes"
2727
)
2828

29-
var (
30-
errInitCanceled = errors.New("init canceled")
31-
)
29+
var errInitCanceled = errors.New("init canceled")
3230

3331
type Init struct {
3432
log logger.Logger
@@ -273,7 +271,7 @@ func (d *Init) promptBasicInfo() error {
273271
return err
274272
}
275273

276-
func (d *Init) runPrompt(ctx context.Context, cfg *projectInit) error { //nolint: gocyclo
274+
func (d *Init) runPrompt(ctx context.Context, cfg *projectInit) error { //nolint:gocyclo
277275
if d.opts.Template != "" && plugin_util.DirExists(d.opts.Path) && !d.opts.Overwrite {
278276
proceed := false
279277
prompt := &survey.Confirm{
@@ -495,7 +493,7 @@ func (d *Init) promptPlugins(cfg *projectInit) error {
495493
return nil
496494
}
497495

498-
func (d *Init) prompt(ctx context.Context, cfg *projectInit) error { //nolint: gocyclo
496+
func (d *Init) prompt(ctx context.Context, cfg *projectInit) error { //nolint:gocyclo
499497
// Setup config object.
500498
cfg.Name = d.opts.Name
501499

pkg/actions/plugins.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func (m *PluginManager) insertInYAML(data []byte) error {
4949
}
5050

5151
configData := m.cfg.YAMLData()
52-
result := append(configData, append([]byte("\n"), data...)...) //nolint: gocritic
52+
result := append(configData, append([]byte("\n"), data...)...) //nolint:gocritic
5353

5454
return fileutil.WriteFile(m.cfg.YAMLPath(), result, fi.Mode())
5555
}

pkg/actions/util.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func computeChangeInfo(cfg *config.Project, state *statefile.StateData, plugin *
130130
return changes
131131
}
132132

133-
func computeDeployChange(cfg *config.Project, oldState, state *statefile.StateData, m map[*plugins.Plugin][]*apiv1.PlanResponse) []*change { //nolint: unparam
133+
func computeDeployChange(cfg *config.Project, oldState, state *statefile.StateData, m map[*plugins.Plugin][]*apiv1.PlanResponse) []*change { //nolint:unparam
134134
var changes []*change
135135

136136
for plugin, reslist := range m {
@@ -147,7 +147,7 @@ func computeDeployChange(cfg *config.Project, oldState, state *statefile.StateDa
147147
return changes
148148
}
149149

150-
func computeDNSChange(cfg *config.Project, oldState, state *statefile.StateData, m map[*plugins.Plugin]*apiv1.PlanDNSResponse) []*change { //nolint: unparam
150+
func computeDNSChange(cfg *config.Project, oldState, state *statefile.StateData, m map[*plugins.Plugin]*apiv1.PlanDNSResponse) []*change { //nolint:unparam
151151
var changes []*change
152152

153153
for plugin, p := range m {

0 commit comments

Comments
 (0)