Comments (6)
Did you perform the merge into target before analysis was done?
from violation-comments-to-stash-plugin.
Hi Tomas, thank you for taking the time to ask!
I don't believe I did. I'm honestly not sure, unless it's something that Bitbucket Server/Jenkins is doing in the background.
What I have is mostly static analysis, but I'm hoping to use the plugin to comment on my pull request.
Essentially, my Jenkinsfile:
- Builds the codebase
- Runs OCLint static analysis, generating a PMD-formatted report (oclint.log)
- Runs the Violation Comments to Bitbucket Server plugin to (hopefully) post the results back to the PR as comments.
I should note that the plugin is working with another file I have containing the build log (output.clang). So the CLANG parser is commenting on my PR, but the PMD parser is not.
from violation-comments-to-stash-plugin.
Found 0 violations from ViolationConfig [pattern=.*/oclint\.log$, reporter=Pmd, parser=PMD]
I think that the oclint.log file is properly formatted PMD-style output. I may be wrong. Looking at the test code in Violations Lib, I think it looks most similar to the PHPMD version, but it's missing a timestamp.
I'm sorry. I know I'm not being terribly helpful, I'm learning as I go.
But I have spent a lot of time debugging how the plugin is used, through the other result file I have that does work (output.clang). I had to generate that file by hand, through trial and error, from some json output from xcpretty.
from violation-comments-to-stash-plugin.
You must first perform the merge. Something like:
stage('Merge') {
sh "git init"
sh "git fetch --no-tags --progress git@git:group/reponame.git +refs/heads/*:refs/remotes/origin/* --depth=200"
sh "git checkout origin/${env.targetBranch}"
sh "git merge origin/${env.sourceBranch}"
sh "git log --graph --abbrev-commit --max-count=10"
}
If the merge is note performed before analysis, then the reported lines will not match the lines in the PR. And no violations will be reported.
from violation-comments-to-stash-plugin.
Ahh, that makes a lot of sense! Maybe that's my problem.
I will try and do this. Honestly, I thought that because I was checking out the PR branch from Bitbucket Server that it was merged. My mistake. I'll close this once I get it working.
Thanks Tomas
from violation-comments-to-stash-plugin.
This might have been solved with tomasbjerre/violations-lib#27
from violation-comments-to-stash-plugin.
Related Issues (20)
- "Outdated" comments not deleted HOT 27
- Credentials not found error HOT 17
- NPE since v1.76 HOT 1
- Plugin doesnโt send comments to bitbucket HOT 17
- All violations related to one file in one comment HOT 7
- Recognition of changed lines seems to not work correclty HOT 15
- Escaped single quote characters in comments
- Allow INFO Files changed to include all scanned files HOT 1
- Violation plugin iterates over files not mentioned in report HOT 6
- NPE after deleting comments HOT 2
- Identify that detecting violations from console/stage output is not supported (directly) HOT 7
- To support Code Insights HOT 2
- INFO POST .../pull-requests/3/comments 400 HOT 5
- Add support for client certificate as credentials HOT 1
- Feature: ignore certain folders/paths/globs HOT 4
- Limit logging of files from Violations Lib HOT 5
- When files paths contains spaces in fails to report warnings HOT 1
- Jenkins agents becoming unresponsive during violations run HOT 3
- Report the "indent" level of an issue HOT 6
- warnings lost, or added as general comments HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from violation-comments-to-stash-plugin.