b3k

b3k

Elixir projects in SonarQube

Hi!

Has anyone integrated the elixir project in SonarQube?

I saw the GitHub - arthepsy/sonar-elixir: SonarQube Elixir plugin · GitHub repo, but it did’t bring anything valuable to Sonar in case of Elixir.

#ci

Most Liked

adrienmo

adrienmo

I’ve tried to make it work with some duct tape!

Here is the plugin:

Which I just found out there and compiled, basically it just give you the ability to scan .ex and .exs files.

Then I extended elixir existing tools to create generic reports:

You then need to configure your:

  • sonar.externalIssuesReportPaths
  • sonar.coverageReportPaths
  • sonar.testExecutionReportPaths

accordingly.

Coverage and execution works fine, credo plugin need some work to classify correctly bug/codesmell/vulnerability and time effort (right now it reports everything as code smell with 90 minutes time resolution) but it works :slight_smile:

Hope it helps!

hpopp

hpopp

I’ve been checking in on this thread periodically over the last several years and finally just decided to build my own plugin: GitHub - hpopp/sonar-elixir: Community SonarQube plugin for the static analysis of Elixir projects. · GitHub

It’s still in early development, but it already supports some amazing features:

At the moment, it only provides a few checks in the quality profile (it’s v0.1.1), but the long term goal is to achieve parity with Credo and Sobelow. I’m effectively rewriting these checks in Java to get the proper native Sonar experience. Help would be greatly appreciated if you want to contribute.

gausby

gausby

What’s a sonar cube ?

Where Next?

Popular in Questions Top

JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

Other popular topics Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New

We're in Beta

About us Mission Statement