Blog post

SonarLint supports Go analysis!

Andrew Osborne photo

Andrew Osborne

Product Marketing Manager

2 min read

  • SonarLint
  • Clean Code
  • VSCode
  • Announcement

There is no doubting the popularity of the Go language. In fact, 20% of developers have used Go in the past 12 months, according to the JetBrains 2022 survey, and it has just returned to the Tiobe index top 10 of most popular programming languages. 

And with the Stackoverflow developer survey 2022 listing Go as the top choice for developers wanting to adopt a new language, the upward trend looks to continue.


So we are thrilled to announce that SonarLint, our free and open-source IDE plugin now supports Go analysis in GoLand and VS Code.

So why is Go so popular?

What is behind the rise in interest in this open-source language? Most commentators suggest that Golang is gaining popularity because of its speed and straightforwardness. Features like its runtime environment, garbage collection, and concurrency approach endear themselves to many programmers. Web developers have been attracted to it because it is fast, scalable, and easy to learn. DevOps professionals appreciate the decent ecosystem of Go libraries providing everything needed to build distributed systems, developer tools, and containerized applications.


Sonar has offered the analysis of Go projects in SonarQube and SonarCloud since 2018.
So it was no surprise that, given its aforementioned popularity, our valued Community voted "support of Go analysis in GoLand and VS Code" as the second and third highest requested features respectively for SonarLint.  


It makes total sense. Developers want to catch Go coding issues in their IDE, whilst they are creating, whilst things are fresh. The last thing they want is rework, and having to fix things retrospectively. It's better to create clean Go code in the IDE, that is, code fit for further development, and ready for production.

So what should a Go developer expect when they use SonarLint in their IDE?

Well, we believe a linter should be a help, not a hindrance. It should be humbly waiting in the wings until needed, not noisy and intrusive. So, you should expect SonarLint to quickly and contextually highlight issues in your Go code, during your creation process, not afterward. It will also offer you the option to learn why an issue is flagged, what is at stake if it is not fixed, and a clear and fast path to its resolution.


So, as new Go code is created, you should expect SonarLint to squiggle any issues as you type, just like a spell-checker for code. Meaning that all new code you write is clean, ensuring you put your best coding foot forward.


And for teams using SonarCloud or SonarQube a simple connection to SonarLint allows decisions regarding specific rule activation/deactivation to be instantly synchronized to the IDE, empowering the developer to focus on what matters.

Go Go Go

So with one out of every two developers planning to adopt a new language, and with Go reported as the top choice, we encourage you to try SonarLint and its solution for Go analysis today. This release is just our first step, and we plan to add more rules during 2023. 


Have an idea of what we should add next? Wondering what is currently the Community's top requested feature for SonarLint? Follow the link to our Product Board to find out, and add your vote to what you want to see next.


Additional Links:

Video announcement

Sonar Community announcement - support for Go analysis in VS Code

Sonar Community announcement - support for Go analysis in GoLand