Code quality checks on pull requests to Radiology module?


I am currently trying out

on my fork of the radiology module

and I like it :slight_smile: showed me some issues where we would run into null pointer exceptions :scream:

@michael since sonar is currently not available for modules could you please activate for OpenMRS, so modules can use it?

Its free for open source projects. I would like to make code quality visible for others, since now will get a lot more different contributors on the radiology module. coveralls for code coverage, has proven to be a great quality gate already. some more focus on quality would be a fantastic addition!


I use personally but adding another check isn’t bad :smiley:

Are you a member of the OpenMRS Org? you should be able to just add the project and then add the badge

@r0bby no I am not yet a member of the OpenMRS org. Where do I apply for it? I have merge rights to the radiology module.

I chose codeacy because it supports java. Codeclimate unfortunately does not. Hope it would be ok to add it @michael

I can’t see it hurting adding to your repo :slight_smile:

you mean codeclimate or codeacy?

@sunbiz are you able to add the module under the organization OpenMRS on ?

I was able to do it, but then it would still be under my user

I mean codeacy. I was able to do it…if you have commit rights…you should be able to configure it. I assume you’re a partial committer

Just FYI, there’s also Bithound.

EDIT: I see codacy is for specific commits. I’m not sure if the others do that.

I think having multiple code quality sites is good :slight_smile:

dear @r0bby I was able to configure it, but I would also like to enable a “Post-Commit Hook” which would speed up the code analysis. I am not able to do that because of insufficient privileges on the repository. I dont have access to the Webhooks & Services of the repo.

Could you please do that for me?

I could send you the hook URL (not sure if its better to send it in a private message, or if it doesnt matter).

Codacy shows these instructions:

  1. Copy the Hook URL to your clipboard
  2. Go to Webhooks & Services under your repository settings
  3. Paste the Hook URL into the “Payload URL” field
  4. Select “application/json” in the “Content type” field
  5. Click “Add webhook”

thanks a lot!

1 Like

thanks for your suggestion!

unfortunately it doesnt support checks for java. thats the reason why I picked codacy. it is the only site I found that supports java (it uses checkstyle).

1 Like

@maany Can you help set up this post-commit hook?

sure, @teleivo can you send me the hook URL :slight_smile:

1 Like

Hi @teleivo! I’m José, evangelist at Codacy.

We do support CheckStyle, but also PMDJava. We’re currently working on integrating FindBugs as well, so we should provide that soon.

Let me know if I can help with anything!

1 Like