Skip to content

golangci-line exit code lost #46

Open
@jacobweinstock

Description

@jacobweinstock

This repo uses the find command to execute golangci-lint in the top level directory. As a side affect of this I believe this swallows the exit code from the actual golangci-lint command. This makes it impossible to use lint-install in CI where a non-zero exit code should fail a build.

❯ make lint
find . -name go.mod -execdir "out/linters/golangci-lint-v1.46.2-x86_64" run -c "" \;
otel/otel.go:229:1: exported: exported method Encoder.EncodeFILE should have comment or be unexported (revive)
func (e *Encoder) EncodeFILE(d *dhcpv4.DHCPv4, namespace string) error {
^
❯ echo $?
0

Same golanglint-ci command run on its own:

❯ out/linters/golangci-lint-v1.46.2-x86_64 run -c "" 
otel/otel.go:229:1: exported: exported method Encoder.EncodeFILE should have comment or be unexported (revive)
func (e *Encoder) EncodeFILE(d *dhcpv4.DHCPv4, namespace string) error {
^
❯ echo $?
1

Expected Behaviour

Current Behaviour

Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

  • Operating System and version (e.g. Linux, Windows, MacOS):

  • How are you running Tinkerbell? Using Vagrant & VirtualBox, Vagrant & Libvirt, on Packet using Terraform, or give details:

  • Link to your project or a code example to reproduce issue:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions