Closed dorimon-1 closed 3 months ago
Hello,
I recommend reading https://golangci-lint.run/welcome/faq/#why-do-you-have-typecheck-errors
The problem is not embedded types.
:thinking: I'm trying to understand the behavior inside your CI.
https://github.com/KJone1/ImageElevator/actions/runs/9423135394/job/25960911614
Maybe it's a side effect of the divergence between your module name github.com/Kjone1/imageElevator
and your repo name https://github.com/KJone1/ImageElevator
:thinking:
Do you depend on cgo?
Yes, you are depending on cgo:
So you need to install the cgo dependency inside the golangci-lint workflow. https://github.com/KJone1/ImageElevator/blob/8a157b63a67c8aa2941fc9a9e686580f2dfab268/.github/workflows/lint.yml
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: golangci-lint
on:
push:
branches:
- main
- master
pull_request:
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22.3'
- name: ⚙️ Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y
sudo apt-get install libbtrfs-dev -y
sudo apt-get install libgpgme-dev -y
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.59
Much appreciated, and apologizes for the miss information
Welcome
Description of the problem
Well I hope im not mistaken and there isn't any issues regarding this. Whenever I'm doing a check on my code base which contains a type with embedded types in it. ex:
I get a linting error only when doing a check with golangci-lint and I get these errors:
My building is passing just fine and I don't get any linting on my code editor
Version of golangci-lint
1.59
Version of the GitHub Action
latest? unsure what versions there are
Workflow file
Golangci-lint configuration
Go version
1.22.3
Code example or link to a public repository