We want to create issues using custom plugin.
Steps which we are following
- Scan master branch
- Create feature branch from master branch
- Make changes in feature branch
- Scan feature branch
- During scan we create issues using below sonar API
If line# fall under modified code then only issues are created, if line# does not fall under modified code then issues are not created.
We want to create issue in unchanged lines in sonar Pull Request(line# does not fall under modified code), is there a way to support this ?
Thanks in advance !
This is not supported – even for our own analysis engine. Pull Requests only report issues on changed files / lines.
Can you provide some more context about the kind of rules you’re developing that would raise issues on old code, that you believe should be raised on pull requests?
We have issues generated from other static analysis tool same we want to create in SQ using custom plugin, here we had that requirement.
We had one more query if you could clarify.
If we add a new rule in Quality profile after master scan, will pull request with no file change show issue for newly added rule in Quality profile or it will only report for new rule of QP in changed code but not in old code.