Comments (13)
Hi @navinprasadk,
Could you provide logs of analysis and version of SonarJS you are using?
How did you understand that jsx files are not checked?
from sonarjs.
sonar qube server 5.6.6
sonar-javascript-plugin-3.1.1.5128
it shows like can't parse .jsx file
render() {
return (
<div>
{/* <span className="page-header dashboard-header">DASHBOARD</span> */}
<div className="row">
here it shows some error in
from sonarjs.
Hi,
I am facing the following error while executing Sonar Runner ( sonar-runner.bat -X)
I have configured the sonar-project file so that it could be use the .jsx file:
sonar.projectKey=Adapt27
sonar.projectName=Adapt
sonar.projectVersion=1.0
sonar.javascript.file.suffixes=.js,.jsx
sonar.sources=server,webclient
sonar.sourceEncoding=UTF-8
We are using the following version
sonar qube server 5.6.6
sonar-javascript-plugin-3.1.1.5128
Error is ;
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 57.625s
Final Memory: 9M/247M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:100)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:53)
Caused by: java.lang.NullPointerException
at io.github.sleroy.sonar.EsLintSensor.execute(EsLintSensor.java:116)
at org.sonar.batch.sensor.SensorWrapper.analyse(SensorWrapper.java:57)
at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:58)
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:50)
at org.sonar.batch.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:1
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.ja
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:241)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.j
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.ja
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
at org.sonar.batch.task.ScanTask.execute(ScanTask.java:47)
at org.sonar.batch.task.TaskContainer.doAfterStart(TaskContainer.java:86)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.ja
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:106)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:119)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:79)
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
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.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
from sonarjs.
@navinprasadk Looks like the problem is not in SonarJS. Can you look what other plugins are installed on your SonarQube instance? Something related to eslint (at io.github.sleroy.sonar.EsLintSensor.execute(EsLintSensor.java:116)
)
from sonarjs.
@vilchik-elena yes, I installed eslint for checking .jsx files
version is
sonar-eslint-plugin-0.1.1
Without eslint plugin , Is there any possibilities to check the .jsx files or not?
from sonarjs.
@navinprasadk then go to support of that plugin. Here I can help you only with SonarJS.
from sonarjs.
There is no support page
Is sonarJS doesn't support .jsx files?
You mentioned sonarJS supports ReactJSX, how?
from sonarjs.
@navinprasadk sorry than, you can drop there plugin to have analysis.
from sonarjs.
You mentioned sonarJS supports ReactJSX, how?
from sonarjs.
@navinprasadk We are able to parse such files, and analyse them as any other js file. You just need to extend default suffixes (which is already the case for you sonar.javascript.file.suffixes=.js,.jsx
). We don't have any rules specific for react.
from sonarjs.
thank you @vilchik-elena. After removing that eslint plugin, now it's working
from sonarjs.
@navinprasadk So what was the problem ? And how do you solve it ? From where did you remove the eslint plugin ? From Sonarqube or from your project ?
from sonarjs.
@borgogelli the problem was that some unsupported plugin was used in SonarQube. This issue is quite old, now we parse jsx files with SonarJS. If you have some issue please open a new one, or you can also use http://community.sonarsource.com
from sonarjs.
Related Issues (20)
- update all (easy) dependencies and evaluate upgrading hard ones
- Create artifact which embeds Node.JS for Alpine Linux HOT 1
- FP S6827: Thymeleaf `th:text` attribute is not recognized as a content HOT 1
- Do not count LOCs for CSS files indexed as test files
- Exclude assignment expressions to `require()` from copy-paste detection HOT 1
- javascript/S6654.html is missing `Of` in references to prototype getter/setter methods of Object
- Fix FP S6754 (`hook-use-state`): Ignore state variables without a setter
- Fix FP S2699 (`assertions-in-tests`): Add support for `supertest` HOT 1
- Fix FP S6747 (`no-unknown-property`): Don't raise for `css` attribute HOT 1
- Fix FP S6747 (`no-unknown-property`): Don't raise for allowed attributes HOT 1
- Fix FP S6747 (`no-unknown-property`): Don't raise issues from `eslint-plugin-react/no-unknown-property` when react is not used HOT 1
- Embedded Node.js runtime: detect the host architecture correctly in MacOS JRE Intel virtualization HOT 1
- Fix FP S6754 (`hook-use-state`): Add exception when using `useState` for components HOT 1
- Embedded Node.js: when `sonar.nodejs.forceHost` is set, do not deploy the runtime HOT 1
- Remove usage of deprecated logging APIs
- JS-18 S6819 False Positive when using SAP UI5 React components HOT 1
- Use 18.17.0 as minimum version for Node.JS
- Ignore runtime errors when saving cpd tokens
- Incorrect S6757 Error for Class Components HOT 8
- We should skip the whole file when we fail to save CPD token
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sonarjs.