- SonarQube version: 22.214.171.124929 Developer Edition
- Rule S1451 “Track lack of copyright and license headers” triggers on full project analysis, but potential issues are not shown in Pull Request decoration (and related Pull Request dashboard on SonarQube UI)
- Steps to reproduce:
- Create repository and project on Sonar (with configured Pull Request Decoration settings)
- Add S1451 rule to Quality Profile (with proper parameters)
- Create Pull Request with new file that doesn’t contain copyright at the top
- Run sonar scanner with parameters set to that Pull Request.
Sonarqube will say that everything is fine, and code does not violate this rule.
I think, that rule S1451 doesn’t work in every language in pull requests. I’ve tested it for golang, java, ruby, kotlin.