favadi / flycheck-gometalinter

Flycheck checker for gometalinter
BSD 2-Clause "Simplified" License
57 stars 8 forks source link

Problems with the $PATH variable #2

Closed MissingNoIOI closed 8 years ago

MissingNoIOI commented 8 years ago

Hi,

I installed the package via Melpa following the README.md, but when I try to edit go code flycheck gives me the following error:

Suspicious state from syntax checker gometalinter: Checker gometalinter returned non-zero exit code 2, but no errors from output: WARNING: exec: "deadcode": executable file not found in $PATH
WARNING: exec: "gosimple": executable file not found in $PATH
WARNING: exec: "gocyclo": executable file not found in $PATH
WARNING: exec: "staticcheck": executable file not found in $PATH
WARNING: exec: "errcheck": executable file not found in $PATH
WARNING: exec: "varcheck": executable file not found in $PATH
WARNING: exec: "ineffassign": executable file not found in $PATH
WARNING: exec: "aligncheck": executable file not found in $PATH
WARNING: exec: "unconvert": executable file not found in $PATH
WARNING: exec: "golint": executable file not found in $PATH
WARNING: exec: "structcheck": executable file not found in $PATH
WARNING: exec: "dupl": executable file not found in $PATH
WARNING: exec: "interfacer": executable file not found in $PATH
WARNING: exec: "goconst": executable file not found in $PATH

Checker definition probably flawed.

I've tried adding the go/bin directory to $PATH via

(add-to-list 'exec-path "~/go/bin/")

and

(setenv "PATH" (concat "~/go/bin/" ":" (getenv "PATH")))

but the error persists. The programs that are supposed to be missing are all installed and can be called from eshell within Emacs. My Emacs Version is 24.5. Any help would be greatly appreciated

favadi commented 8 years ago

Have you installed gometalinter following this instruction? Note that you will have to install both gometalinter, and after that gometalinter checkers.

If yes, please executes those command in shell-command (M-!) and post the results here.

echo $PATH
which gometalinter
which gosimple
MissingNoIOI commented 8 years ago

Yes, I've followed the Installation instructions of gometalinter. I've somehow fixed it (at least the error isn't appearing any longer) by hardcoding the PATH into /etc/profile. (Which is kinda strange since the same code was already in ~/.profile) And while the error is gone I still can't execute which gometalinter via M-!, where I get gometalinter not found (Same with the other tools.)I can execute them all fine via eshell on the other hand. Executing echo $PATH via M-! gets me /home/gerrit/.cabal/bin:/home/gerrit/go/bin/:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin at which point I'm just completely stumped and start believing that my Emacs might be possessed. I'm not quite sure one can do much more at this point, and since the error is gone for some strange reason, I think this issue can be closed.