4

I´m trying to use golangci-lint with vscode, however when i run it, the following error occurs

level=warning msg="[runner] Can't run linter goanalysis_metalinter: goimports: error computing diff: exec: "diff": executable file not found in %PATH%" level=error msg="Running error: 1 error occurred:\n\t* can't run linter goanalysis_metalinter: goimports: error computing diff: exec: "diff": executable file not found in %PATH%\n\n"

Does anyone know what do do?

5
  • What is the output for which diff Commented Oct 16, 2022 at 4:57
  • @SuyashMedhavi i´m on windows, says the command is not recognized Commented Oct 16, 2022 at 5:04
  • 5
    Ah your question dosent mention you are on windows. Anyways looks like you are missing a diff tool. Install one from gnuwin32.sourceforge.net/packages/diffutils.htm and restart your machine and try the go command again. Also make sure the diff tool you add is there in your path Commented Oct 16, 2022 at 5:06
  • @SuyashMedhavi added C:\Program Files (x86)\GnuWin32\bin\diff3.exe to path, still not working, any ideas? Thanks for your help Commented Oct 16, 2022 at 5:23
  • I believe its looking for an exe named diff and not diff3. See you can fix that. Worst case, rename the exe Commented Oct 17, 2022 at 5:34

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.