meshery-operator
meshery-operator copied to clipboard
Fix duplicate 'run' key in golangci-lint config
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
runsection at line 75 - Completed the first
runsection by populating the emptyskip-dirslist 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:
- Configure Actions setup steps to set up my environment, which run before the firewall is enabled
- Add the appropriate URLs or hosts to the custom allowlist in this repository's Copilot coding agent settings (admins only)
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
- π Meshery Build & Release Strategy
- π Instructions for contributing to documentation
- π¨ Wireframes and designs for Meshery UI in Figma (open invite)
- ππΎππΌ Questions: Discussion Forum and Community Slack </issue_description>
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.