Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 19, 2025

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)


💡 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.

@jamieplu jamieplu marked this pull request as ready for review December 19, 2025 17:42
Copilot AI changed the title [WIP] Fix Golang lint failures in configuration Fix duplicate 'run' key in golangci-lint config Dec 19, 2025
Copilot AI requested a review from ritzorama December 19, 2025 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Golang lint failures

2 participants