Remove InputFile from upload to server

Hi,

We have our own build system with a proprietary build description. We want to analyze and upload only the files that are included in the build description. So far we use the CLI SonarScanner, which loads too many files on the server.

  • Is there a way to filter the indexed files in a sensor?
  • Or is there a way to mark files (InputFile) so that they are not loaded on the server?

Thanks for the support.

Regards,

Hi Guenter,

Have you tried a tighter sonar.sources definition? inclusions / exclusions?

 
Ann

Hi Ann,

Narrowing the analyzed files with includes/excludes would mean to list every file (e.g folder patterns are not possible in my case). Second problem is that this step is already done before plugins/sensors are called.

For my understanding the „indexing step“ is the first one before calling the sensors. That was the reason why I’m was asking if it is possible to „filter“ the result or do something else in an own plugin to exclude InputFiles?

Regards,

Hi Guenter,

Sorry, but I don’t think there’s anything out there for your situation.

 
:woman_shrugging:
Ann

Hi Ann,

could SensorContext.markAsUnchanged do the job? Or what is this API doing?

Regards,

Hi,

I believe that’s part of the new incremental analysis on PRs. It has been implemented in recent versions for Java & JS/TS, and I expect more languages to come in future versions. What languages are you using? Maybe you could take advantage simply by upgrading?

 
Ann