jenkinsci / violation-comments-to-stash-plugin

Comments Bitbucket Server (or Stash) pull requests with static code analyzer findings.
https://plugins.jenkins.io/violation-comments-to-stash
MIT License
43 stars 16 forks source link

Give it a symbol and extension #43

Closed jetersen closed 6 years ago

jetersen commented 6 years ago

image

Now you get this heap of mess from the Script Generator. To reduce the mess you create a jelly and a descriptor for the config to avoid empty things in the generator

ViolationsToBitbucketServer([bitbucketServerUrl: '',
password: '',
projectKey: '',
pullRequestId: '',
repoSlug: '',
username: '',
usernamePasswordCredentialsId: '',
violationConfigs: [[parser: 'ANDROIDLINT',
pattern: '',
reporter: 'ANDROIDLINT'],
[parser: 'CHECKSTYLE',
pattern: '',
reporter: 'CHECKSTYLE'],
[parser: 'CODENARC',
pattern: '',
reporter: 'CODENARC'],
[parser: 'CLANG',
pattern: '',
reporter: 'CLANG'],
[parser: 'CPD',
pattern: '',
reporter: 'CPD'],
[parser: 'CPPCHECK',
pattern: '',
reporter: 'CPPCHECK'],
[parser: 'CPPLINT',
pattern: '',
reporter: 'CPPLINT'],
[parser: 'CSSLINT',
pattern: '',
reporter: 'CSSLINT'],
[parser: 'FINDBUGS',
pattern: '',
reporter: 'FINDBUGS'],
[parser: 'FLAKE8',
pattern: '',
reporter: 'FLAKE8'],
[parser: 'FXCOP',
pattern: '',
reporter: 'FXCOP'],
[parser: 'GENDARME',
pattern: '',
reporter: 'GENDARME'],
[parser: 'JCREPORT',
pattern: '',
reporter: 'JCREPORT'],
[parser: 'JSHINT',
pattern: '',
reporter: 'JSHINT'],
[parser: 'LINT',
pattern: '',
reporter: 'LINT'],
[parser: 'KLOCWORK',
pattern: '',
reporter: 'KLOCWORK'],
[parser: 'MYPY',
pattern: '',
reporter: 'MYPY'],
[parser: 'GOLINT',
pattern: '',
reporter: 'GOLINT'],
[parser: 'GOOGLEERRORPRONE',
pattern: '',
reporter: 'GOOGLEERRORPRONE'],
[parser: 'PERLCRITIC',
pattern: '',
reporter: 'PERLCRITIC'],
[parser: 'PITEST',
pattern: '',
reporter: 'PITEST'],
[parser: 'PMD',
pattern: '',
reporter: 'PMD'],
[parser: 'PYDOCSTYLE',
pattern: '',
reporter: 'PYDOCSTYLE'],
[parser: 'PYLINT',
pattern: '',
reporter: 'PYLINT'],
[parser: 'RESHARPER',
pattern: '',
reporter: 'RESHARPER'],
[parser: 'SBTSCALAC',
pattern: '',
reporter: 'SBTSCALAC'],
[parser: 'SIMIAN',
pattern: '',
reporter: 'SIMIAN'],
[parser: 'STYLECOP',
pattern: '',
reporter: 'STYLECOP'],
[parser: 'XMLLINT',
pattern: '',
reporter: 'XMLLINT'],
[parser: 'ZPTLINT',
pattern: '',
reporter: 'ZPTLINT'],
[parser: 'DOCFX',
pattern: '',
reporter: 'DOCFX']]])
jetersen commented 6 years ago

Had a hard time building locally :| The POM needs some first aid. Working on windows the formatter decided to change all newlines to LF showing up as changes to git.