perforce / sonar-scm-perforce

SonarQube Perforce plugin
6 stars 23 forks source link

Multiple improvements #12

Open mjdetullio opened 8 years ago

mjdetullio commented 8 years ago

I found that "follow all integrations" gives far more accurate results than "follow branches".

There were cases I've run into with CRLF and mixed line endings that do not report blame correctly. I've added an attempt to account for CRLFs in cases where the P4Java API returns double the annotations than the file has lines.

Added support for multi-threaded blame, which makes things blazingly fast compared to blaming one file at a time. Code highly resembles the Git blame connector.

I also ran into some cases where connection would fail randomly during blame. This made it impossible to blame very large projects when running a first-time analysis. I added a basic retry.

I've been using these changes in production for a month now. Take it or leave it.

henryju commented 8 years ago

Hi @mjdetullio and thanks again for your contribution on this plugin. All changes look good but I was just looking for a few more tests if possible.

ganncamp commented 8 years ago

@mjdetullio we've moved this plugin to the community and no longer maintain it directly. Let us know if you'd like to take over maintenance of this. Then you could merge your own PR. :-)

mjdetullio commented 8 years ago

I've since switched employers and no longer have access to a production Perforce system. It would be better for someone else to maintain. I may still get around to writing a couple tests for this though.

ganncamp commented 8 years ago

Okay, thanks.