Performing sonar analysis without code coverage(making it optional in pipeline)

Hi all,
I am trying to perfrom sonar analysis on jenkins pipeline.
I want to make code coverage inclusion optional.
But if I run sonarqube command without passing coverage path, it throws me below error
sonarqube-generic-coverage.xml (No such file or directory)

Hey there

We assume that if sonar.coverageReportPaths is passed… you expect it to be there (there should be continuity between scans). At the same time, when coverage reports are passed to other analysis parameters the scanner usually just says “Warning, not found” and moves on.

I guess I’d like to know more about your use-case: are you trying to build some generic pipeline that all your projects use? Does the coverage report sometimes exist and sometimes not (for the same project) when the scan happens? Why?