Closed
Description
I recently created a desktop app on top of an existing go project using Wails, since then golangci-lint
is failing.
These is some information:
.gitlab-ci.yml
image: golang:latest
.go-cache:
variables:
GOPATH: $CI_PROJECT_DIR/.go
before_script:
- mkdir -p .go
cache:
paths:
- .go/pkg/mod/
variables:
DOCKER_IMAGE: $CI_REGISTRY_IMAGE
DOCKER_IMAGE_GOOGLE: eu.gcr.io/<company>-1217/<module>
WINDOWS_GO_VERSION: "go1.14.2"
CI_FRONTEND_VERSION: "v1.2.0"
stages:
- lint_and_test
golangci-lint:
stage: lint_and_test
tags: [ins-linux]
extends: .go-cache
variables:
GOLANGCILINT_VERSION: "v1.24.0"
only:
changes:
- "**/*.go"
- ci/*
before_script:
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b . $GOLANGCILINT_VERSION
script:
- ./golangci-lint run
Error output
Running with gitlab-runner 13.9.0 (2ebc4dc4)
on Linux and Android Runner TGF4nDqP
section_start:1615285008:prepare_executor
Preparing the "docker" executor
Using Docker executor with image golang:latest ...
Pulling docker image golang:latest ...
Using docker image sha256:3a9c0da5404733c64471209e9aea7aa352a8969c72394447cfb514dcf222cc6a for golang:latest with digest golang@sha256:c9c3bd7c5cb8e58c1b2d15bb0cd7e43569f920659f71a4a993ca534ee185a1b4 ...
section_end:1615285011:prepare_executor
section_start:1615285011:prepare_script
Preparing environment
Running on runner-tgf4ndqp-project-20985389-concurrent-0 via c7a3188fe3e6...
section_end:1615285012:prepare_script
section_start:1615285012:get_sources
Getting source from Git repository
Fetching changes with git depth set to 50...
Reinitialized existing Git repository in /builds/<company>/<project>/<module>/.git/
Checking out 274ca284 as <branch>...
Removing .go/
Removing .testCoverage.txt
Skipping Git submodules setup
section_end:1615285015:get_sources
section_start:1615285015:restore_cache
Restoring cache
Checking cache for default...
No URL provided, cache will not be downloaded from shared cache server. Instead a local version of cache will be extracted.
Successfully extracted cache
section_end:1615285052:restore_cache
section_start:1615285052:step_script
Executing "step_script" stage of the job script
Using docker image sha256:3a9c0da5404733c64471209e9aea7aa352a8969c72394447cfb514dcf222cc6a for golang:latest with digest golang@sha256:c9c3bd7c5cb8e58c1b2d15bb0cd7e43569f920659f71a4a993ca534ee185a1b4 ...
$ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b . $GOLANGCILINT_VERSION
golangci/golangci-lint info checking GitHub for tag 'v1.24.0'
golangci/golangci-lint info found version: 1.24.0 for v1.24.0/linux/amd64
golangci/golangci-lint info installed ./golangci-lint
$ ./golangci-lint run
read /builds/<company>/<project>/<module>/.go: is a directory
read /builds/<company>/<project>/<module>/.go: is a directory
read /builds/<company>/<project>/<module>/.go: is a directory
level=warning msg="[runner] Can't run linter goanalysis_metalinter: buildir: failed to load package webview: could not load export data: no export data for \"github.com/wailsapp/wails/lib/renderer/webview\""
level=warning msg="[runner] Can't run linter unused: buildir: failed to load package webview: could not load export data: no export data for \"github.com/wailsapp/wails/lib/renderer/webview\""
level=error msg="Running error: buildir: failed to load package webview: could not load export data: no export data for \"github.com/wailsapp/wails/lib/renderer/webview\""
section_end:1615285111:step_script
section_start:1615285111:cleanup_file_variables
Cleaning up file based variables
section_end:1615285112:cleanup_file_variables
ERROR: Job failed: exit code 1
Tried also the latest v1.38.0
version but I had the same error.
Is there a way to solve the issue or ignore that package?