Error during SonarAnalysis: InvalidPathException: Illegal char <<> at index 0: <enter\


We use SonarCloud to analyse our code, and lately we tried to analyse our embededd code which is compile by Clang.

Sonar analysis is launched with AzureDevOps and the prepare analysis step is done with those parameters:\BuildWrapper\ArtefactStagingDirectory
sonar.css.node= "C:\Program Files\nodejs"

An analysis has been alreade correctly done, but when we include in the source files our drivers code we got this error during the analysis step:

ERROR: Error during SonarScanner execution
##[error]java.nio.file.InvalidPathException: Illegal char <<> at index 0: <enter\

You can find complete log into the linked file.

Do you have a way to know on which file this error occur?

Do you know this kind of error and how I can fix it maybe ?

Thank you for your help
LogErrorSonar.txt (879.9 KB)

Hello @AlexJulita,

You seem to have the “<enter …” string that is used in place of a filepath. Could it be that you did not replace some placeholder like “<enter path here>”?

For starters, can you, please, provide the as well as the invocation line of sonar-scanner?

Hello @necto ,
Thank you for your answer!

So, we use SonarCloud GUI and we don’t use a file to configure the scanner. The only tune thing we give to the scanner is on our pipeline, the “prepare analysis” phase, here is the yaml :


  • task: SonarSource.sonarcloud.14d9cde6-c1da-4d55-aa01-2965cd301255.SonarCloudPrepare@1
    displayName: ‘Prepare analysis on SonarCloud’
    SonarCloud: ‘SonarCloud IC Tiama’
    organization: ‘nicolas-courtiller19594’
    scannerMode: CLI
    configMode: manual
    cliProjectKey: ‘TIAMA_MonoRepos_099-42-TR_HotMass2_Embedded’
    cliProjectName: ‘TR HotMass2 Embedded’
    cliSources: ‘Core,DetAspect,DetHotMassNG,DetRadiation’
    extraProperties: |\BuildWrapper\ArtefactStagingDirectory
    sonar.css.node= “C:\Program Files\nodejs”
    sonar.log.level = TRACE

So I guess this is mostly by default configuration.

The main issue is that if I don’t exclude 1 specific folder, this error occurs else the analysis works fine.

Here is the list of exclusion working:
(without the CALIA4 exclusion the error occurs)

Have you configured the full pipeline required for C and C++ analysis?
You can follow the “Analyzing a C/C++/Obj-C project” section in SonarQube documentation on Azure DevOps integration.
Note that configuring the “prepare analysis” step is not enough: you need to also download the Build Wrapper before the analysis step and invoke it with your build command (in the “Command Line” task).


the full pipeline is working; when we exclude the folder CALIA4 we can see the analysis result on Sonar Cloud.

Do you think this error could be cause by an erroneous file at the time of its analysis or it is for sure a problem on the configuration side?

When you “can see the analysis result”, do you see any C or C++ issues on SonarCloud?

Can you, please, share the contents of the build-wrapper-output directory (i.e. “C:\BuildWrapper\ArtefactStagingDirectory”) after the compilation (you will probably need to insert a command after the “Compile Workbench pour VisioCxp” step)?

Yes I see every C++ issues on SonarCloud when I exclude the folder that make the analysis fail

We run it on our own VM so here is the build-wrapper log and json. This is from my last run with the same java.nio.file.InvalidPathException: Illegal char <<> at index 0: <enter\

Thank you for your help
build wrapper (1.0 MB)

Thank you for the BuildWrapper output, it gave me a better insight into your compilation process. Here is one of the compilation commands that you execute when building the project:

-I<enter your include search path here>
-o DKMlib_Libs_C4_partialImage\NonDebug\Objects\DKMlib_Libs_C4\LIBS_C4\LibAcqTrt\LibAcqTrt.o
-c D:\AzDvOps_work\40\s\Core\CALIA4\LIBS_C4\LibAcqTrt\LibAcqTrt.cpp

Note the line

-I<enter your include search path here>

This line uses an invalid path “<enter” as a user-provided include directory. This is the cause of your analysis failure, as our analyzer does not accept an invalid path for an include directory.

In order to avoid the analysis failure, you should remove the -I<enter your include search path here> option wherever it comes from.

Let me know if you have further questions


Correction has been done and this was the reason of the failure !!

Thank you very much for your support, I think without you I could’nt find why!

Have a nice day,

See you !

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.