Violation Comments to Bitbucket Server Lib

December 28, 2022 ยท View on GitHub

Maven Central

This is a library that adds violation comments from static code analysis to Bitbucket Server.

It uses Violation Comments Lib and supports the same formats as Violations Lib.

Very easy to use with a nice builder pattern

  violationCommentsToBitbucketServerApi() //
    .withViolations(".*/findbugs/.*\\.xml$", FINDBUGS, rootFolder) //
    .withViolations(".*/checkstyle/.*\\.xml$", CHECKSTYLE, rootFolder) //
    .withUsername("username")
    .withPassword("password")
    .withProjectKey("projectKey")
    .withRepoSlug("repoSlug")
    .withPullRequestId("pullRequestId")
    .toPullRequest();

Usage

This software can be used:

Properties

It can be configured with some Java properties:

  • VIOLATIONS_KEYSTORE_PATH - A path to a keystore.
  • VIOLATIONS_KEYSTORE_PASS - Password for the keystore.
  • VIOLATIONS_PAT - Personal access token used to authenticate.
  • VIOLATIONS_USERNAME - Username to authenticate with.
  • VIOLATIONS_PASSWORD - Password to authenticate with.

Developer instructions

To build the code, have a look at .travis.yml.

To do a release you need to do ./gradlew release and release the artifact from staging. More information here.