Git Product home page Git Product logo

Comments (7)

tomasbjerre avatar tomasbjerre commented on June 26, 2024

No. That is not implemented.

from violation-comments-to-stash-plugin.

tomasbjerre avatar tomasbjerre commented on June 26, 2024

You can configure a custom template, if that helps you. If what you want is to reduce the size of the comments.

from violation-comments-to-stash-plugin.

lelik9 avatar lelik9 commented on June 26, 2024

Yes, I want to reduce amount of comments. How should I configure custom template?
But I suppose it will be the same as Create one big comment with all violations option. Am I correct?
Also I looked into bitbucket documentation, and it seems to be impossible to create one comment with a few anchors.

from violation-comments-to-stash-plugin.

tomasbjerre avatar tomasbjerre commented on June 26, 2024

The custom template only applies to each comment. If you create one big comment, this template will be used to render each violation within that big comment.

So you cannot reduce the amount of comments, but you can reduce the text in them.

In a pipeline you can configure a custom template with:

  ViolationsToBitbucketServer([
   bitbucketServerUrl: 'http://localhost:7990/',
   commentOnlyChangedContent: true,
   commentOnlyChangedContentContext: 5,
   createCommentWithAllSingleFileComments: false,
   createSingleFileComments: true,
   keepOldComments: true,
   projectKey: 'PROJ', // Use environment variable here
   pullRequestId: '1', // Use environment variable here
   repoSlug: 'violations-test', // Use environment variable here
   
   credentialsId: 'theid',
   
   commentTemplate: """
   **Reporter**: {{violation.reporter}}{{#violation.rule}}
   
   **Rule**: {{violation.rule}}{{/violation.rule}}
   **Severity**: {{violation.severity}}
   **File**: {{violation.file}} L{{violation.startLine}}{{#violation.source}}
   
   **Source**: {{violation.source}}{{/violation.source}}
   
   {{violation.message}}
   """,
   
   violationConfigs: [
    // Many more formats available, check https://github.com/tomasbjerre/violations-lib
    [parser: 'FINDBUGS', pattern: '.*/findbugs/.*\\.xml\$', reporter: 'Findbugs'],
    [parser: 'CHECKSTYLE', pattern: '.*/checkstyle/.*\\.xml\$', reporter: 'Checkstyle']
   ]
  ])

from violation-comments-to-stash-plugin.

lelik9 avatar lelik9 commented on June 26, 2024

Okay, yhanks.
And one more question, is it possible to remove this line <this is a auto generated comment from violation-comments-lib F7F8ASD8123FSDF> <a-1204338283> from a comment?

from violation-comments-to-stash-plugin.

tomasbjerre avatar tomasbjerre commented on June 26, 2024

No it has to be there.

With Github and Gitlab it is possible to render it invisible with markdown. Perhaps it is possible in Bitbucket also.

from violation-comments-to-stash-plugin.

lelik9 avatar lelik9 commented on June 26, 2024

Thank you.

from violation-comments-to-stash-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.