Branch plugin (Dev edition) + External language plugin

Hello,

I’m working on the plugin for a language which (unfortunately) heavily relies on include files. It’s usually not possible to compile (and then analyze) those files on their own, as they very often rely on preprocessor parameters when they are called. This means that when a developer modifies an include file in a branch, no issues are reported in SonarQube.
Is it possible from a language plugin to inject a list of files to be analyzed when working with branches ? In other words, if the only modified file in a branch is ‘xxx.i’, and that this include file is referenced in ‘xxx.p’ and ‘yyy.p’, then the plugin could “tell” SonarQube to also analyze “xxx.p” and “yyy.p”.

Hope that’s clear enough :slight_smile:

Gilles

Giles,

The default behavior of SonarQube should be to analyze all files — but if I recall correctly, issues will only be reported on short-lived branches and pull requests if at least one issue location is located on a changed line (as reported by SCM).

In 8.1+, all issues are reported on all branches (a branch is a branch is a branch) — so maybe that helps? Pull Requests will still face this though, and there’s not much to do about that. :confused:

Out of curiosity, what SonarQube version are you working with?

Colin

Colin,

Thank you for your answer. Indeed, I’ve done some more tests this morning, and now the issues appear correctly in the short-lived branch. Don’t know what I’ve done wrong yesterday, but it’s good to see it working perfectly !
Just in case, using 7.9.1.

Gilles