Coder Social home page Coder Social logo

Comments (13)

vilchik-elena avatar vilchik-elena commented on May 31, 2024

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.

navinprasadk avatar navinprasadk commented on May 31, 2024

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

tag

from sonarjs.

navinprasadk avatar navinprasadk commented on May 31, 2024

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.

vilchik-elena avatar vilchik-elena commented on May 31, 2024

@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.

navinprasadk avatar navinprasadk commented on May 31, 2024

@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.

vilchik-elena avatar vilchik-elena commented on May 31, 2024

@navinprasadk then go to support of that plugin. Here I can help you only with SonarJS.

from sonarjs.

navinprasadk avatar navinprasadk commented on May 31, 2024

There is no support page
Is sonarJS doesn't support .jsx files?
You mentioned sonarJS supports ReactJSX, how?

from sonarjs.

vilchik-elena avatar vilchik-elena commented on May 31, 2024

@navinprasadk sorry than, you can drop there plugin to have analysis.

from sonarjs.

navinprasadk avatar navinprasadk commented on May 31, 2024

You mentioned sonarJS supports ReactJSX, how?

from sonarjs.

vilchik-elena avatar vilchik-elena commented on May 31, 2024

@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.

navinprasadk avatar navinprasadk commented on May 31, 2024

thank you @vilchik-elena. After removing that eslint plugin, now it's working

from sonarjs.

borgogelli avatar borgogelli commented on May 31, 2024

@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.

saberduck avatar saberduck commented on May 31, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.