Error on css linting

hi All,

our sonar analysis fail with the following message. can someone point me to the right direction of fixing this?

INFO: Sensor SonarCSS Rules [cssfamily]

##[error]ERROR: Failed to run external linting process

java.nio.file.InvalidPathException: Illegal char <<> at index 0: <input css 1>

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.io.File.toPath(Unknown Source)

at org.sonar.api.scan.filesystem.PathResolver.relativePath(PathResolver.java:121)

at org.sonar.api.batch.fs.internal.predicates.AbsolutePathPredicate.get(AbsolutePathPredicate.java:51)

at org.sonar.api.batch.fs.internal.DefaultFileSystem.inputFiles(DefaultFileSystem.java:138)

at org.sonar.api.batch.fs.internal.DefaultFileSystem.inputFile(DefaultFileSystem.java:108)

at org.sonar.css.plugin.CssRuleSensor.saveIssues(CssRuleSensor.java:170)

at org.sonar.css.plugin.CssRuleSensor.execute(CssRuleSensor.java:116)

at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)

at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)

at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59)

at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)

at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59)

at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)

at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)

at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)

at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:397)

at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:393)

at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:356)

at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)

at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)

at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)

at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)

at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)

at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)

at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)

at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)

at com.sun.proxy.$Proxy0.execute(Unknown Source)

at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:185)

at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:137)

at org.sonarsource.scanner.cli.Main.execute(Main.java:111)

at org.sonarsource.scanner.cli.Main.execute(Main.java:75)

at org.sonarsource.scanner.cli.Main.main(Main.java:61)

ERROR: Failed to run external linting process

java.nio.file.InvalidPathException: Illegal char <<> at index 0: <input css 1>

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.io.File.toPath(Unknown Source)

at org.sonar.api.scan.filesystem.PathResolver.relativePath(PathResolver.java:121)

at org.sonar.api.batch.fs.internal.predicates.AbsolutePathPredicate.get(AbsolutePathPredicate.java:51)

at org.sonar.api.batch.fs.internal.DefaultFileSystem.inputFiles(DefaultFileSystem.java:138)

at org.sonar.api.batch.fs.internal.DefaultFileSystem.inputFile(DefaultFileSystem.java:108)

at org.sonar.css.plugin.CssRuleSensor.saveIssues(CssRuleSensor.java:170)

at org.sonar.css.plugin.CssRuleSensor.execute(CssRuleSensor.java:116)

at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)

at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)

at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59)

at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)

at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59)

at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)

at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)

at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)

at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:397)

at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:393)

at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:356)

at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)

at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)

at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)

at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)

at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)

at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)

at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)

at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)

at com.sun.proxy.$Proxy0.execute(Unknown Source)

at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:185)

at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:137)

at org.sonarsource.scanner.cli.Main.execute(Main.java:111)

at org.sonarsource.scanner.cli.Main.execute(Main.java:75)

at org.sonarsource.scanner.cli.Main.main(Main.java:61)
1 Like

Anyone got any advice?

Hi @Pop_Levente,

I havenā€™t seen this error before. Could you please provide

  • the whole analysis log after running the scanner with --debug option, i.e. sonar-scanner --debug.
  • your sonar-project.properties file.

Are you importing stylelint issues from a report?

Hey, after the debug i can see this. no we donā€™t import the stylelint issues.

14:07:22.647 DEBUG: Deploying bundle to e:\work\28\s.scannerwork

14:07:30.851 DEBUG: Using default Node.js executable: ā€˜nodeā€™.

14:07:30.851 DEBUG: Checking Node.js version

14:07:30.867 DEBUG: Launching command [node, -v]

14:07:30.882 DEBUG: Using Node.js v8.5.0.

14:07:30.898 DEBUG: Starting process: node e:\work\28\s.scannerwork\css-bundle\node_modules\stylelint\bin\stylelint E:\work\28\s***{.css,.less,.scss,.html,.xhtml,.cshtml,.vbhtml,.aspx,.ascx,.rhtml,.erb,.shtm,.shtml,php,php3,php4,php5,phtml,inc} --config e:\work\28\s.scannerwork\css-bundle\stylelintconfig.json -f json

14:07:30.898 DEBUG: Launching command [node, e:\work\28\s.scannerwork\css-bundle\node_modules\stylelint\bin\stylelint, E:\work\28\s***{.css,.less,.scss,.html,.xhtml,.cshtml,.vbhtml,.aspx,.ascx,.rhtml,.erb,.shtm,.shtml,php,php3,php4,php5,phtml,inc}, --config, e:\work\28\s.scannerwork\css-bundle\stylelintconfig.json, -f, json]

##[error]14:07:51.014 ERROR: Failed to run external linting process

java.nio.file.InvalidPathException: Illegal char <<> at index 0: <input css 1>

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.io.File.toPath(Unknown Source)

at org.sonar.api.scan.filesystem.PathResolver.relativePath(PathResolver.java:121)

at org.sonar.api.batch.fs.internal.predicates.AbsolutePathPredicate.get(AbsolutePathPredicate.java:51)

at org.sonar.api.batch.fs.internal.DefaultFileSystem.inputFiles(DefaultFileSystem.java:138)

at org.sonar.api.batch.fs.internal.DefaultFileSystem.inputFile(DefaultFileSystem.java:108)

at org.sonar.css.plugin.CssRuleSensor.saveIssues(CssRuleSensor.java:170)

at org.sonar.css.plugin.CssRuleSensor.execute(CssRuleSensor.java:116)

at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)

at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)

at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59)

at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)

at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59)

at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)

at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)

at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)

at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:397)

at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:393)

at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:356)

at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)

at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)

at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)

at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)

at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)

at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)

at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)

at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)

at com.sun.proxy.$Proxy0.execute(Unknown Source)

at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:185)

at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:137)

at org.sonarsource.scanner.cli.Main.execute(Main.java:111)

at org.sonarsource.scanner.cli.Main.execute(Main.java:75)

at org.sonarsource.scanner.cli.Main.main(Main.java:61)

14:07:51.014 ERROR: Failed to run external linting process

java.nio.file.InvalidPathException: Illegal char <<> at index 0: <input css 1>

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.io.File.toPath(Unknown Source)

at org.sonar.api.scan.filesystem.PathResolver.relativePath(PathResolver.java:121)

at org.sonar.api.batch.fs.internal.predicates.AbsolutePathPredicate.get(AbsolutePathPredicate.java:51)

at org.sonar.api.batch.fs.internal.DefaultFileSystem.inputFiles(DefaultFileSystem.java:138)

at org.sonar.api.batch.fs.internal.DefaultFileSystem.inputFile(DefaultFileSystem.java:108)

at org.sonar.css.plugin.CssRuleSensor.saveIssues(CssRuleSensor.java:170)

at org.sonar.css.plugin.CssRuleSensor.execute(CssRuleSensor.java:116)

at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)

at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)

at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59)

at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)

at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59)

at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)

at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)

at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)

at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:397)

at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:393)

at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:356)

at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)

at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)

at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)

at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)

at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)

at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)

at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)

at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)

at com.sun.proxy.$Proxy0.execute(Unknown Source)

at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:185)

at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:137)

at org.sonarsource.scanner.cli.Main.execute(Main.java:111)

at org.sonarsource.scanner.cli.Main.execute(Main.java:75)

at org.sonarsource.scanner.cli.Main.main(Main.java:61)

Hi @Pop_Levente,

Thanks for the additional logs. Sadly it doesnā€™t explain why you have this problem.
Could you share your sonar-project.properties file? If you have a package.json or yarn.lock I would also need the list of dependencies. Maybe a third party library is messing things up.

I tried the CSS analysis on windows and macos and everything seems to work fine.

Cheers,

Hi @Nicolas_Harraudeau,

unfortunately i have no idea where to find that file. we use sonarcloud, and all we did is to install the VSO extension within Azure devOps.

we use the:

  1. Prepare Analysis Configuration task - with the following configs
    sonar.java.coveragePlugin=lcov
    sonar.javascript.lcov.reportPaths=(Build.SourcesDirectory)/coverage/lcov.info sonar.junit.reportPaths=(Build.SourcesDirectory)/test-results.xml

  2. Run Code Analysis task

  3. Publish Quality Gate Result task

on our builds. but nothing extra. no further settings as far as i know.

We are also getting the same issue. Even though we are not explicitly using any external lint for CSS.
If anyone found the solution it will be greatly appreciated?

Thanks

Hello @Pop_Levente,

As such, the error comes from the node executable and not the scanner. Though there is something fishy in how the CSS analyzer is trying to launch node, ie:

14:07:30.898 DEBUG: Launching command [node, e:\work\28\s.scannerwork\css-bundle\node_modules\stylelint\bin\stylelint, E:\work\28\s***{.css,.less,.scss,.html,.xhtml,.cshtml,.vbhtml,.aspx,.ascx,.rhtml,.erb,.shtm,.shtml,php,php3,php4,php5,phtml,inc}, --config, e:\work\28\s.scannerwork\css-bundle\stylelintconfig.json, -f, json]

Iā€™m not sure where are your sources directory, but generally speaking, this path should looks something like E:\work\28\s\**\*{<all extensions>} while on your side it is E:\work\28\s***{<all extensions>}. The latter makes no sense node-wise, so it fails.

Have you any idea how this could happen? If not weā€™ll need to decrypt whatā€™s going on, so as @Nicolas_Harraudeau asked, could you please provide:

  • the full build+analysis debug log, as an attached file, to avoid formatting issues
  • the list of parameters you pass to the scanner. And I think there are more than listed as I can see the working directory being named s.scannerwork while the default name is .scannerwork (parameter sonar.working.directory). The easiest would be to attach the YAML version of your pipeline, so we can understand all of your config.

Also is it an open source project that we could try to analyze?

Cheers

1 Like

The error message seems to be caused by a file named <input css 1>. The < is not a valid character in a Windows path, and so an exception is thrown.

Iā€™ve seen this in another thread too, so I suppose itā€™s not part of your project, but itā€™s generated by something. Can you find what it is? If you remove this file before running the analysis, I think it should work. Can you please give that a try?

Hey Janos,

thanks for your answer. we donā€™t have any file named input css. but will double check if something generates that.

I believe itā€™s not file name but file content. Check that please

i checked, but nothing like that. would be nice to have a starting point what to check ā€¦ :slight_smile:
iā€™ve also setup sonar scanner locally, but i got the same issue:

15:29:55.256 DEBUG: Starting process: node C:\projects\BlueDolphin\app\.scannerwork\css-bundle\node_modules\stylelint\bin\stylelint C:\projects\BlueDolphin\app\**\*{.css,.less,.scss,.html,.xhtml,.cshtml,.vbhtml,.aspx,.ascx,.rhtml,.erb,.shtm,.shtml,php,php3,php4,php5,phtml,inc} --config C:\projects\BlueDolphin\app\.scannerwork\css-bundle\stylelintconfig.json -f json 15:29:55.256 DEBUG: Launching command [node, C:\projects\BlueDolphin\app\.scannerwork\css-bundle\node_modules\stylelint\bin\stylelint, C:\projects\BlueDolphin\app\**\*{.css,.less,.scss,.html,.xhtml,.cshtml,.vbhtml,.aspx,.ascx,.rhtml,.erb,.shtm,.shtml,php,php3,php4,php5,phtml,inc}, --config, C:\projects\BlueDolphin\app\.scannerwork\css-bundle\stylelintconfig.json, -f, json] 15:29:57.398 ERROR: Failed to run external linting process java.nio.file.InvalidPathException: Illegal char <<> at index 0: <input css 1> at java.base/sun.nio.fs.WindowsPathParser.normalize(Unknown Source) at java.base/sun.nio.fs.WindowsPathParser.parse(Unknown Source) at java.base/sun.nio.fs.WindowsPathParser.parse(Unknown Source) at java.base/sun.nio.fs.WindowsPath.parse(Unknown Source) at java.base/sun.nio.fs.WindowsFileSystem.getPath(Unknown Source) at java.base/java.io.File.toPath(Unknown Source) at org.sonar.api.scan.filesystem.PathResolver.relativePath(PathResolver.java:121) at org.sonar.api.batch.fs.internal.AbsolutePathPredicate.get(AbsolutePathPredicate.java:52) at org.sonar.api.batch.fs.internal.DefaultFileSystem.inputFiles(DefaultFileSystem.java:135) at org.sonar.api.batch.fs.internal.DefaultFileSystem.inputFile(DefaultFileSystem.java:105) at org.sonar.css.plugin.CssRuleSensor.saveIssues(CssRuleSensor.java:170) at org.sonar.css.plugin.CssRuleSensor.execute(CssRuleSensor.java:116) at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48) at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85) at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59) at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77) at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59) at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122) at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:400) at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:395) at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:358) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122) at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122) at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73) at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67) at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60) at com.sun.proxy.$Proxy0.execute(Unknown Source) at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:185) at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:137) at org.sonarsource.scanner.cli.Main.execute(Main.java:112) at org.sonarsource.scanner.cli.Main.execute(Main.java:75) at org.sonarsource.scanner.cli.Main.main(Main.java:61)

as i see the code ā€œ<input css 1>ā€ is at your side (sonar scanner), iā€™m not sure why you are not aware of that?
itā€™s in the .scannerwork\css-bundle\node_modules\postcss\lib\input.js file, namely

if (!this.file) {
sequence += 1;
/**
* The unique ID of the CSS source. It will be created if from option
* is not provided (because PostCSS does not know the file path).
*
* @type {string}
*
* @example
* const root = postcss.parse(css)
* root.source.input.file //=> undefined
* root.source.input.id //=> ā€œ<input css 1>ā€
*/

  this.id = '<input css ' + sequence + '>';
}

iā€™ve tried to debug here, but itā€™s getting overwritten all the time, so not useful. any help with this is welcome ā€¦

Hi, i am also facing the same issue after we moved SonarQube version 7.9.1.
Any quick help here would be very helpful.

BR//Manoj N

Just chiming in that we are also running into this exact issue for our Azure DevOps-builds:

INFO: Load metrics repository
INFO: Load metrics repository (done) | time=16ms
INFO: Sensor SonarCSS Metrics [cssfamily]
INFO: Sensor SonarCSS Metrics [cssfamily] (done) | time=219ms
INFO: Sensor SonarCSS Rules [cssfamily]
##[error]ERROR: Failed to run external linting process
java.nio.file.InvalidPathException: Illegal char <<> at index 0: <input css 1>

Please not we havenā€™t actively set up any kind of CSS-linting or analysis, so either weā€™re missing some basic configuration or itā€™s a bug in the sonar-scanner code.

Is there no way to turn off CSS-linting/analysis entirely?

Same problem here. I am trying to setup SonarQube for my new job to show how great it is and getting this error. If not resolved soon I will be forced to find other scanners. The change to only allow ā€œmasterā€ branch to be scanned in the free version already threw a monkey wrench into this, I donā€™t need this alsoā€¦

Community Edition - Version 7.9.1 (build 27448)

##[error]ERROR: Failed to run external linting process

java.nio.file.InvalidPathException: Illegal char <<> at index 0: <input css 1>

ERROR: Failed to run external linting process

java.nio.file.InvalidPathException: Illegal char <<> at index 0: <input css 1>

##[error]at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)

at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)

at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)

at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)

at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)

at java.io.File.toPath(File.java:2234)

at org.sonar.api.scan.filesystem.PathResolver.relativePath(PathResolver.java:121)

at org.sonar.api.batch.fs.internal.AbsolutePathPredicate.get(AbsolutePathPredicate.java:52)

at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)

at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)

at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)

at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)

at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)

at java.io.File.toPath(File.java:2234)

at org.sonar.api.scan.filesystem.PathResolver.relativePath(PathResolver.java:121)

at org.sonar.api.batch.fs.internal.AbsolutePathPredicate.get(AbsolutePathPredicate.java:52)

##[error]at org.sonar.api.batch.fs.internal.DefaultFileSystem.inputFiles(DefaultFileSystem.java:135)

at org.sonar.api.batch.fs.internal.DefaultFileSystem.inputFile(DefaultFileSystem.java:105)

at org.sonar.css.plugin.CssRuleSensor.saveIssues(CssRuleSensor.java:170)

at org.sonar.api.batch.fs.internal.DefaultFileSystem.inputFiles(DefaultFileSystem.java:135)

at org.sonar.api.batch.fs.internal.DefaultFileSystem.inputFile(DefaultFileSystem.java:105)

at org.sonar.css.plugin.CssRuleSensor.saveIssues(CssRuleSensor.java:170)

INFO: Sensor SonarCSS Rules [cssfamily] (done) | time=57641ms

Several people getting the same issue, so i really doubt Sonar people cannot reproduce the issue. please give us at least something to start on. or fix the relevant place not to give such and ugly error.

Hi,

Sorry for the delay on investigating this problem. I donā€™t know exactly the root problem (still canā€™t reproduce it), but looks like itā€™s related to less and using ** in comments (check this https://github.com/shellscape/postcss-less/issues/138). In that case file name provided by postcss-less is not a real file name but <input css 1>.

So on your side you can try to find such code in your code base (//**).

Anyway there is also bug on our side, we try to get file based on provided filepath (<input css 1> in this case) before checking rule key (parsing error in this case).

We will try to release a patch asap.
Ticket to follow -> https://github.com/SonarSource/sonar-css/issues/208

I do not see ā€˜<input css 1>ā€™ in the code, but when I search on ā€˜//**ā€™ there are several hits in the Bootstrap 3.1.1 library in the variables.less file.