Package Details: checkmake 0.3.2-1

Git Clone URL: https://aur.archlinux.org/checkmake.git (read-only, click to copy)
Package Base: checkmake
Description: Linter/analyzer for Makefiles
Upstream URL: https://github.com/mrtazz/checkmake
Licenses: MIT
Conflicts: checkmake-bin, checkmake-git
Submitter: m-pilia
Maintainer: barbuk
Last Packager: barbuk
Votes: 8
Popularity: 0.177696
First Submitted: 2018-11-19 13:40 (UTC)
Last Updated: 2026-09-15 11:46 (UTC)

Dependencies (3)

Required by (0)

Sources (1)

Latest Comments

prochac commented on 2026-09-09 08:40 (UTC)

I'm having troubles to install/build this package:

==> Starting build()...
cmd/checkmake/main_test.go:81:23: string `../../fixtures/missing_phony.make` has 8 occurrences, make it a constant (goconst)
        cmd.SetArgs([]string{"../../fixtures/missing_phony.make"})
                             ^
cmd/checkmake/main_test.go:218:10: string `json` has 3 occurrences, make it a constant (goconst)
                        "-o", "json",
                              ^
rules/maxbodylength/maxbodylength_test.go:17:5: string `echo 'foo'` has 11 occurrences, make it a constant (goconst)
                                "echo 'foo'",
                                ^
rules/minphony/minphony_test.go:19:14: string `green-eggs.mk` has 4 occurrences, make it a constant (goconst)
                        FileName: "green-eggs.mk",
                                  ^
rules/minphony/minphony_test.go:25:12: string `PHONY` has 4 occurrences, make it a constant (goconst)
                                {Name: "PHONY", Assignment: "green-eggs ham"},
                                       ^
rules/minphony/minphony_test.go:30:17: string `minphony` has 6 occurrences, make it a constant (goconst)
                                Rule:       "minphony",
                                            ^
rules/minphony/minphony_test.go:97:13: string `test.mk` has 3 occurrences, make it a constant (goconst)
                FileName: "test.mk",
                          ^
rules/minphony/minphony_test.go:136:13: string `all` has 3 occurrences, make it a constant (goconst)
                        {Target: "all"},
                                 ^
rules/phonydeclared/phonydeclared_test.go:21:13: string `all` has 3 occurrences, make it a constant (goconst)
                                Target: "all",
                                        ^
rules/uniquetargets/uniquetargets_test.go:17:13: string `test` has 5 occurrences, make it a constant (goconst)
                        {Target: "test", LineNumber: 5},
                                 ^
rules/uniquetargets/uniquetargets_test.go:34:13: string `build` has 3 occurrences, make it a constant (goconst)
                        {Target: "build", LineNumber: 5},
                                 ^
11 issues:
* goconst: 11
make: *** [Makefile:115: golangci-lint] Error 1
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: checkmake-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
checkmake - exit status 4

It's because the default make target includes golangci-lint run

all: check.go.lint require $(TARGETS) $(MAN_TARGETS)

.DEFAULT_GOAL:=all

binaries: $(TARGETS)

The make binaries could do the trick, but then it won't build the man pages. Anyway, I think that passing linter isn't necessary build step, rather some CI/dev quality check.

m-pilia commented on 2022-08-27 12:34 (UTC)

@alerque: Added, thanks!

alerque commented on 2022-08-15 13:43 (UTC)

Please package the man page for this project in the right place so man checkmake works.

m-pilia commented on 2021-05-30 12:28 (UTC)

@rafaelff: As it says in the error message you posted, checkmake requires to provide BUILDER_NAME and BUILDER_EMAIL as environment variables (otherwise it falls back to reading username and e-mail from the git configuration). So you need to inject those variables in your chroot environment for the build to work.

Since it looks like this can still catch people by surprise, I changed the PKGBUILD to fall back to a default string (set to "makepkg") if builder name/email are not available through env nor through the git config. If you want to properly customise those values in your build, you still need to provide the environment variables though.

rafaelff commented on 2021-05-29 11:17 (UTC)

Failed for me building on clean chroot.

==> Starting build()...
Makefile:20: *** "You must set environment variable BUILDER_NAME or set a user.name in your git configuration.".  Stop.
==> ERROR: A failure occurred in build().