Must-share information (formatted with Markdown):
SonarQube 9.9 LTS Developer Edition
deployed via Docker
wish to have understanding of a code smell not showing up in branch but showing up once merged.
Scenario is as follows:
Repository is setup as follows:
Development branch is “main” branch and treats “new” code as since prior version.
Branches are compared against development branch to detect new code.
Branch was created, went through refactoring (deleting code, moving to new file,…), Cleaned of any smells
Branch was merged
Main Branch (Development) now has an unused constant as a code smell.
I want to know why it wasn’t detected in the branch prior to merge that the variable was dead/no longer in use.
Sometimes, if an issue doesn’t involve a changed line of code it can only be raised after the merge. So if you used a function somewhere… and stopped using it (but still had the function which hadn’t changed somewhere in your code)… the issue will only be raised on an analysis of the main branch. You can vote for this roadmap item here.