VSCODE - Unable to analyse any files

Greetings! I’ve been having trouble with SonarLint 1.6.0 in Visual Studio Code, the following error occurs when I try to scan any file.

Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 36: /usr/local/repo/System/web/[uri=file:///c%3A/Users/matheus.oliveira/Documents/SoftExpertExcellenceSuiteV2/System/web/include/training/gn_defaultframe/class.course_org_mapping_assoc_frame.inc]

Full log: https://pastebin.com/amryYs7F

Seems to be related to this issue: https://jira.sonarsource.com/browse/SLI-256

My first time here so if you need any more info let me know!

Hi,

The error is caused by a custom rule (a rule developed on your side, and packaged in a custom plugin installed in your SonarQube server):

Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 36: /usr/local/repo/System/web/[uri=file:///c%3A/Users/matheus.oliveira/Documents/SoftExpertExcellenceSuiteV2/System/web/include/training/gn_defaultframe/class.course_org_mapping_assoc_frame.inc]
	at sun.nio.fs.WindowsPathParser.normalize(Unknown Source)
	at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
	at sun.nio.fs.WindowsPathParser.parse(Unknown Source)
	at sun.nio.fs.WindowsPath.parse(Unknown Source)
	at sun.nio.fs.WindowsFileSystem.getPath(Unknown Source)
	at java.nio.file.Paths.get(Unknown Source)
	at org.sonar.samples.php.checks.FunctionCommentsCheck.visitCompilationUnit(FunctionCommentsCheck.java:125)

If you could share the code of FunctionCommentsCheck.java, we might try to help.

1 Like

Thanks for the help, Julien. I talked to our team and we’ll try to fix the code by ourselves but I appreciate your suggestion.

Have a good day!