mrtazz / checkmake

experimental linter/analyzer for Makefiles
MIT License
1.04k stars 45 forks source link

build cannot load bufio: malformed module path #37

Closed wilsonmar closed 4 years ago

wilsonmar commented 4 years ago

When I install $ go get github.com/mrtazz/checkmake go: downloading github.com/docopt/docopt-go v0.0.0-20141128170934-854c423c8108 go: downloading github.com/olekukonko/tablewriter v0.0.0-20150822215231-b9346ac189c5 go: downloading github.com/go-ini/ini v1.11.0 go: extracting github.com/olekukonko/tablewriter v0.0.0-20150822215231-b9346ac189c5 go: extracting github.com/docopt/docopt-go v0.0.0-20141128170934-854c423c8108 go: extracting github.com/go-ini/ini v1.11.0 go: finding github.com/docopt/docopt-go v0.0.0-20141128170934-854c423c8108 go: finding github.com/olekukonko/tablewriter v0.0.0-20150822215231-b9346ac189c5 go: finding github.com/go-ini/ini v1.11.0 build github.com/mrtazz/checkmake: cannot load bufio: malformed module path "bufio": missing dot in first path element

Output of checkmake --version

Didn't get that far

Output of checkmake --debug <your makefile>

Output of make --version

GNU Make 3.81

wilsonmar commented 4 years ago

bufio is mentioned in parser/scanner.go

mrtazz commented 4 years ago

missing dot in first path element is often a sign that some of your golang configs might be set up in a non ideal way. Mind adding the following details of your go environment:

go version
echo $GOROOT
echo $GOPATH
echo $GO111MODULE
christian-weiss commented 4 years ago

Instead of installing it with go get you could "install" the binary (you need to compile it first). Using the binary approach makes you independent from golang config.

christian-weiss commented 4 years ago

BTW: it is a problem with your golang config. A quick check with a fresh golang envionment confirms that everything in git repo is ok:

docker run --rm -v $(pwd):/data --workdir /data checkmake/buildenv:latest go get github.com/mrtazz/checkmake
mrtazz commented 4 years ago

closing this since it seems to be an issue with your go setup. Feel free to reopen if this turns out to be a problem with checkmake