tbc0
tbc0

Reputation: 1587

How can I use SonarQube before making a commit?

I found Using SonarQube in Eclipse and will ask a separate question targeted at Python. But here I want to ask more generally how to use SonarQube as a replacement for lint-like UNIX CLI tools while I'm working on individual source files before I commit. Specifically, what if I don't want to fire up Eclipse? I just want to make some tweaks to source file and check it against rules such as "Collapsible 'if' statements should be merged" (the actual example that's blocking me today).

Even if I could commit to an experimental branch and see my analysis before I open a pull request, that would be better than nothing.

Upvotes: 5

Views: 2137

Answers (1)

Tibor Blenessy
Tibor Blenessy

Reputation: 4430

You can use SonarLint to run the analysis before the commit. It can be installed as plugin into your editor. Download and further instructions are available here http://www.sonarlint.org

Upvotes: 13

Related Questions