meshery-operator icon indicating copy to clipboard operation
meshery-operator copied to clipboard

Fix duplicate 'run' key in golangci-lint config

Open Copilot opened this issue 2 months ago β€’ 0 comments

The .golangci.yml file contained duplicate run keys (lines 62 and 75), causing golangci-lint to fail with a YAML parsing error.

Changes:

  • Removed duplicate run section at line 75
  • Completed the first run section by populating the empty skip-dirs list with the intended directories (vendor, bundle, config, hack, helpers, img)

Before:

run:
  timeout: 5m
  enable-cache: true
  skip-dirs:    # Empty, invalid structure
issues:
  exclude-dirs:
    - vendor
    # ...

run:              # Duplicate key
  timeout: 5m
  enable-cache: true

After:

run:
  timeout: 5m
  enable-cache: true
  skip-dirs:
    - vendor
    - bundle
    - config
    - hack
    - helpers
    - img

issues:
  exclude-dirs:
    - vendor
    # ...

[!WARNING]

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • golangci-lint.run
    • Triggering command: /home/REDACTED/go/bin/golangci-lint golangci-lint config verify -c .golangci.yml -c=4 -nolocalimports -importcfg /tmp/go-build824034657/b653/importcfg -pack /home/REDACTED/go/pkg/mod/helm.sh/helm/[email protected]/pkg/chart/loader/archive.go /home/REDACTED/go/pkg/mod/helm.sh/helm/[email protected]/pkg/chart/loader/directory.go 0.1- _proto/common.pb.go rg/[email protected]/grpc/internal/resolver/passthrough ux-amd64/pkg/tool/linux_amd64/compile [email protected] internal/strings-o l/linux_amd64/co/tmp/go-build824034657/b617/_pkg_.a ux-amd64/pkg/too-trimpath (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Golang lint failures</issue_title> <issue_description>#### Current Behavior

run golangci-lint
  Running [/home/runner/golangci-lint-2.7.2-linux-amd64/golangci-lint config path] in [/home/runner/work/meshery-operator/meshery-operator] ...
  Running [/home/runner/golangci-lint-2.7.2-linux-amd64/golangci-lint run] in [/home/runner/work/meshery-operator/meshery-operator] ...
  Error: can't load config: can't read viper config: While parsing config: yaml: unmarshal errors:
    line 75: mapping key "run" already defined at line 62
  The command is terminated due to an error: can't load config: can't read viper config: While parsing config: yaml: unmarshal errors:
    line 75: mapping key "run" already defined at line 62

Contributor Guides and Resources

Comments on the Issue (you are @copilot in this section)

  • Fixes meshery/meshery-operator#688

πŸ’‘ You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot avatar Dec 19 '25 17:12 Copilot