skip to Main Content

I’m just starting my journey with Go and wonder why I have warnings about Go source code in the IDE.

enter image description here

Is there an easy way to disable these? Why is VScode even reporting them?

I’m using the default Go extension and 1.22.3 Go version.

2

Answers


  1. Chosen as BEST ANSWER

    I had some very old version of staticcheck (present in go/bin folder).
    After re-installing Go and VScode Go extension, it works without problems.

    Shout to JimB for giving me a hint.


    1. Navigate to your workspace settings by clicking on File -> Preferences -> Settings (or by pressing Ctrl +,).
    2. Click on the {} icon in the top right corner of the settings window. This opens the settings.json file.
    3. Add the following configuration to disable warnings for Go:
    "go.lintTool": "none"
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search