golangci-lint run command shows errors in makefile

Issue

I have created a make file to run some bash commands for Go.

This is check.sh file

This is my make file

Error is : make: *** [Makefile:23: check] Error 1

How can I solve this issue?

Solution

According to this stackoverflow answer that happens if one of the commands exits with exit code != 0. That is the case if golangci-lint finds something to complain about.

Try putting the call to golangci-lint directly in the make file.

From my Makefiles:

lint:
    golangci-lint run

Answered By – TehSphinX

Answer Checked By – Katrina (GoLangFix Volunteer)

Leave a Reply

Your email address will not be published.