SonarQube Plugins
  1. SonarQube Plugins
  2. SONARPLUGINS-457

Add Perforce support to the SCM Activity Plugin

    Details

    • Number of attachments :
      0

      Description

      Please add support for Perforce to the SCM Activity Plugin. The equivalent of svn blame is called p4 annotate and is well documented:

      http://www.perforce.com/perforce/doc.092/manuals/cmdref/annotate.html

      And details on scripting is here with some example output (but if you use the -G flag it will format as a Python dictionary which may be easier to use programmatically):

      http://www.perforce.com/perforce/doc.current/manuals/p4guide/08_scripting.html
      http://www.perforce.com/perforce/doc.current/manuals/p4guide/08_scripting.html#1040450

        Issue Links

          Activity

          Hide
          Brian Jackson added a comment -

          So I went ahead and just tried running it locally on my laptop since I know p4 is setup but I still get "The perforce command failed.". I turned on debugging (-X -e -Ddebug=true) but couldn't get any extra details printed. Can you add some debug logging of what command is being run and the exact errors that the p4 command is returning? Or let me know the correct command to turn on debugging if you are already doing this?

          Show
          Brian Jackson added a comment - So I went ahead and just tried running it locally on my laptop since I know p4 is setup but I still get "The perforce command failed.". I turned on debugging (-X -e -Ddebug=true) but couldn't get any extra details printed. Can you add some debug logging of what command is being run and the exact errors that the p4 command is returning? Or let me know the correct command to turn on debugging if you are already doing this?
          Hide
          Brian Jackson added a comment -

          Oops, somehow I didn't have the p4 executable on the PATH on my laptop. That's what I get for testing this out while I'm exhausted. Once I fixed my PATH env var it ran fine, but failed due to another reason so I haven't had a chance to verify the output yet. Thanks for implementing this so quickly! (BTW, is there a way to tell the sonar:sonar plugin to just run this one sonar plugin since I'm trying to test?)

          Show
          Brian Jackson added a comment - Oops, somehow I didn't have the p4 executable on the PATH on my laptop. That's what I get for testing this out while I'm exhausted. Once I fixed my PATH env var it ran fine, but failed due to another reason so I haven't had a chance to verify the output yet. Thanks for implementing this so quickly! (BTW, is there a way to tell the sonar:sonar plugin to just run this one sonar plugin since I'm trying to test?)
          Hide
          Evgeny Mandrikov added a comment -

          Sorry, but I don't understand: plugin doesn't work? If so, what's the reason?

          And no, currently there is no way to exclude/include plugins from analyzes.

          Show
          Evgeny Mandrikov added a comment - Sorry, but I don't understand: plugin doesn't work? If so, what's the reason? And no, currently there is no way to exclude/include plugins from analyzes.
          Hide
          Brian Jackson added a comment -

          Sorry for the confusion and delay, I was tired and had other build issues to iron out. I have now completed a run of sonar with this version of the SCM Activity Plugin and Perforce it worked great. Thanks Evgeny.

          Show
          Brian Jackson added a comment - Sorry for the confusion and delay, I was tired and had other build issues to iron out. I have now completed a run of sonar with this version of the SCM Activity Plugin and Perforce it worked great. Thanks Evgeny.
          Hide
          Evgeny Mandrikov added a comment -

          Great news, so I've marked this issue as resolved.

          FYI: I've created another one (SONARPLUGINS-462) for p4java.

          Show
          Evgeny Mandrikov added a comment - Great news, so I've marked this issue as resolved. FYI: I've created another one ( SONARPLUGINS-462 ) for p4java.

            People

            • Assignee:
              Evgeny Mandrikov
              Reporter:
              Brian Jackson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: